build(#10336): load locales and vite config

This commit is contained in:
Acid Chicken (硫酸鶏)
2023-03-20 14:56:34 +09:00
parent 91e0e498eb
commit 0dcb99df19
441 changed files with 1365 additions and 15 deletions

View File

@@ -1,9 +1,21 @@
import type { Preview } from '@storybook/vue3';
import { applyTheme } from '../src/scripts/theme';
import { type Preview, setup } from '@storybook/vue3';
import locale from './locale';
import theme from './theme';
import '../src/style.scss';
applyTheme(theme);
localStorage.setItem("locale", JSON.stringify(locale));
Promise.all([
import('../src/components'),
import('../src/directives'),
import('../src/widgets'),
import('../src/scripts/theme').then(({ applyTheme }) => applyTheme(theme)),
]).then(([{ default: components }, { default: directives }, { default: widgets }]) => {
setup((app) => {
components(app);
directives(app);
widgets(app);
});
})
const preview = {
parameters: {