frandiox / vite-ssr

Use Vite for server side rendering in Node
MIT License
823 stars 91 forks source link

command "--mode" option become invalid #172

Open gitsheny opened 2 years ago

gitsheny commented 2 years ago

when i use command "vite-ssr build --mode test", the mode in vite.config.js is still "development".

gitsheny commented 2 years ago

"./src/build/index.ts", line:21
const viteConfig = _viteConfig || await resolveViteConfig() why not set param "mode" from "inlineBuildOptions" to "resolveViteConfig"

gitsheny commented 2 years ago

a temporary solution : "cross-env MODE=test vite-ssr build --mode test",