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",

View File

@@ -21,11 +21,11 @@
},
"devDependencies": {
"@microsoft/api-extractor": "7.34.4",
"@swc/jest": "0.2.24",
"@types/jest": "29.5.0",
"@types/node": "18.15.11",
"@typescript-eslint/eslint-plugin": "5.57.0",
"@typescript-eslint/parser": "5.57.0",
"@swc/jest": "0.2.24",
"eslint": "8.37.0",
"jest": "^29.5.0",
"jest-fetch-mock": "^3.0.3",
@@ -40,6 +40,7 @@
"dependencies": {
"@swc/cli": "0.1.62",
"@swc/core": "1.3.42",
"autobind-decorator": "^2.4.0",
"eventemitter3": "5.0.0",
"reconnecting-websocket": "^4.4.0"
}