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 5f2a4eee016776381a7d80407e28d129c252228f. * 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:
parent
5059d4d7e1
commit
59046d583d
14 changed files with 54 additions and 36 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue