try fixing storybook

This commit is contained in:
Kagami Sascha Rosylight 2023-07-09 01:19:05 +02:00
parent a831411eea
commit 5f2a4eee01
1 changed files with 8 additions and 6 deletions

View File

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