build(#10336): make storybook buildable

This commit is contained in:
Acid Chicken (硫酸鶏)
2023-04-01 18:05:14 +09:00
parent e7a15b5604
commit 65f20de821
4 changed files with 408 additions and 18 deletions

View File

@@ -23,6 +23,13 @@ const config = {
async viteFinal(config, options) {
return mergeConfig(config, {
assetsInclude: [resolve(__dirname, '../node_modules/@tabler/icons-webfont/**/*.{css,eot,ttf,woff,woff2}')],
build: {
target: [
'chrome108',
'firefox109',
'safari16',
],
},
});
},
} satisfies StorybookConfig;

View File

@@ -5,6 +5,7 @@
"watch": "vite",
"build": "vite build",
"storybook-dev": "chokidar 'src/**/*.{mdx,ts,vue}' -d 1000 -t 1000 --initial -i '**/*.stories.ts' -c 'pkill -f node_modules/storybook/index.js; node_modules/.bin/tsc -p .storybook && node .storybook/generate.js && node .storybook/preload-locale.js && node .storybook/preload-theme.js && node_modules/.bin/storybook dev -p 6006 --ci'",
"build-storybook": "node_modules/.bin/tsc -p .storybook && node .storybook/generate.js && node .storybook/preload-locale.js && node .storybook/preload-theme.js && node_modules/.bin/storybook build",
"test": "vitest --run",
"test-and-coverage": "vitest --run --coverage",
"typecheck": "vue-tsc --noEmit",
@@ -112,6 +113,7 @@
"@vue/runtime-core": "3.2.47",
"astring": "^1.8.4",
"chokidar-cli": "^3.0.0",
"chromatic": "^6.17.2",
"cross-env": "7.0.3",
"cypress": "12.9.0",
"eslint": "8.37.0",