mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-01-15 17:34:38 +00:00
fix storybook build
This commit is contained in:
parent
d3431ec776
commit
38631ab7ba
@ -34,8 +34,8 @@
|
||||
"server": "node --loader ts-node/esm ./server/index.ts",
|
||||
"server:dev": "npm run server",
|
||||
"server:prod": "cross-env NODE_ENV=production npm run server",
|
||||
"storybook": "cross-env STORYBOOK=true storybook dev -p 6006",
|
||||
"storybook:build": "cross-env STORYBOOK=true && storybook build",
|
||||
"storybook": "storybook dev -p 6006",
|
||||
"storybook:build": "storybook build -o build/storybook",
|
||||
"test:lint": "eslint --ext .vue,.ts,.tsx,.js,.jsx --max-warnings 0 --ignore-path .gitignore .",
|
||||
"test:unit": "vitest",
|
||||
"test:unit:coverage": "npm run test:unit -- run --coverage",
|
||||
|
||||
@ -3,10 +3,13 @@ import vue from '@vitejs/plugin-vue'
|
||||
import vike from 'vike/plugin'
|
||||
import { UserConfig } from 'vite'
|
||||
|
||||
const isStorybook = () =>
|
||||
['storybook', 'storybook:build'].includes(process.env.npm_lifecycle_event as string)
|
||||
|
||||
const config: UserConfig = {
|
||||
plugins: [
|
||||
vue(),
|
||||
process.env.STORYBOOK !== 'true' && vike(), // SSR only when storybook is not running
|
||||
!isStorybook() && vike(), // SSR only when storybook is not running
|
||||
vueI18n({
|
||||
ssr: true,
|
||||
}),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user