build(#10336): load locales and vite config
This commit is contained in:
@@ -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: {
|
||||
|
Reference in New Issue
Block a user