You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run npx vite build && npx vite preview, the server is not started. It seems like npx vite preview just exists, without any output.
I have created as small a reproduction as I could manage. It is quite strange, since it involves dynamic import, an environment variable, setting a property on global, JSON.stringify, an if statement, and more. If I remove any of the elements, npx vite preview starts working again 🤔
But my use case involves all those things, so it would be great if it could be fixed :)
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
When I run
npx vite build && npx vite preview
, the server is not started. It seems likenpx vite preview
just exists, without any output.I have created as small a reproduction as I could manage. It is quite strange, since it involves dynamic import, an environment variable, setting a property on
global
,JSON.stringify
, anif
statement, and more. If I remove any of the elements,npx vite preview
starts working again 🤔But my use case involves all those things, so it would be great if it could be fixed :)
Reproduction
https://github.com/Stadly/reproduction/tree/vite/dynamic-import
Steps to reproduce
Run
npx vite build
followed bynpx vite preview
System Info
System: OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye) CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz Memory: 8.25 GB / 15.50 GB Container: Yes Shell: 5.1.4 - /bin/bash Binaries: Node: 20.10.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.2.3 - /usr/local/bin/npm pnpm: 8.14.0 - /usr/local/share/npm-global/bin/pnpm npmPackages: vite: ^5.0.3 => 5.0.12
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: