How can I run 'storybook dev' in production mode? #29288
Unanswered
riffdr
asked this question in
Documentation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working in a vite monorepo which has to have set the NODE_ENV variable to 'production' by default. My storybook is running on the "@storybook/html-vite" framework. I manage to override the 'development' mode using 'viteFinal' in my SB config file when building storybook, but not when serving it via the CLI command 'storybook dev' , which triggers the vite.config.ts build function 'defineConfig' always in 'development' mode and does not wait for 'viteFinal' to complete.
Seems that vite.config.ts gets called before the viteFinal function in .storybook/main.ts.
Any ideas of how to bypass the default configuration mode 'storybook dev'. Thank you
Beta Was this translation helpful? Give feedback.
All reactions