refactor(locales, sw): use es module (#11204)
* refactor(locales): use es module
* fix sw build
* fix gulp
* try fixing storybook
* Revert "try fixing storybook"
This reverts commit 5f2a4eee01
.
* try fixing storybook 2
* Update main.ts
* Update build.js
* Update main.ts
* Update changes.ts
* fix sw lint
* Update build.js
This commit is contained in:

committed by
GitHub

parent
5059d4d7e1
commit
59046d583d
@@ -1,7 +1,10 @@
|
||||
import fs from 'node:fs/promises';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import path from 'node:path';
|
||||
import micromatch from 'micromatch';
|
||||
import main from './main';
|
||||
import main from './main.js';
|
||||
|
||||
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
||||
|
||||
interface Stats {
|
||||
readonly modules: readonly {
|
||||
@@ -13,8 +16,8 @@ interface Stats {
|
||||
}[];
|
||||
}
|
||||
|
||||
fs.readFile(
|
||||
path.resolve(__dirname, '../storybook-static/preview-stats.json')
|
||||
await fs.readFile(
|
||||
new URL('../storybook-static/preview-stats.json', import.meta.url)
|
||||
).then((buffer) => {
|
||||
const stats: Stats = JSON.parse(buffer.toString());
|
||||
const keys = new Set(stats.modules.map((stat) => stat.id));
|
||||
|
Reference in New Issue
Block a user