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:
Kagami Sascha Rosylight 2023-07-09 10:19:07 +02:00 committed by GitHub
parent 5059d4d7e1
commit 59046d583d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 54 additions and 36 deletions

View file

@ -1,9 +1,8 @@
import { writeFile } from 'node:fs/promises';
import { resolve } from 'node:path';
import * as locales from '../../../locales';
import * as locales from '../../../locales/index.js';
writeFile(
resolve(__dirname, 'locale.ts'),
await writeFile(
new URL('locale.ts', import.meta.url),
`export default ${JSON.stringify(locales['ja-JP'], undefined, 2)} as const;`,
'utf8',
)