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 trying to run a production build for a JSX-based Vue project, the build finishes but trying to serve the dist folder doesn't render anything and gives this error:
Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".
Reproduction
Clone this repo, run yarn build, then serve the dist folder and visit it in the browser.
vite build --debug
vite v0.16.12
Building for production...
vite:resolve (extension) /Users/adamwathan/Code/vite-jsx-build-fail/Users/adamwathan/Code/vite-jsx-build-fail/index.html -> /Users/adamwathan/Code/vite-jsx-build-fail/Users/adamwathan/Code/vite-jsx-build-fail/index.html +0ms
vite:build:asset /Users/adamwathan/Code/vite-jsx-build-fail/favicon.ico -> /_assets/favicon.0e56a3c3.ico +0ms
vite:resolve (extension) /Users/adamwathan/Code/vite-jsx-build-fail/vite/jsx -> /Users/adamwathan/Code/vite-jsx-build-fail/vite/jsx +150ms
'vue' is imported by ../../../../vite/jsx, but could not be resolved – treating it as an external dependency
[write] dist/_assets/index.8345e3ca.js 34.91kb, brotli: 12.72kb
[write] dist/_assets/style.bba68bf6.css 0.00kb, brotli: 0.00kb
[write] dist/_assets/favicon.0e56a3c3.ico 4.19kb, brotli: 0.74kb
[write] dist/index.html 0.32kb, brotli: 0.14kb
Build completed in 2.05s.
The text was updated successfully, but these errors were encountered:
This issue has been locked since it has been closed for more than 14 days.
If you have found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Vite version. If you have any other comments you should join the chat at Vite Land or create a new discussion.
Describe the bug
When trying to run a production build for a JSX-based Vue project, the build finishes but trying to serve the
dist
folder doesn't render anything and gives this error:Reproduction
Clone this repo, run
yarn build
, then serve thedist
folder and visit it in the browser.https://github.com/adamwathan/vite-jsx-build-fail
System Info
vite
version: 0.16.12vue
version (fromyarn.lock
orpackage-lock.json
): 3.0.0-beta.14@vue/compiler-sfc
version: 3.0.0-beta.14Logs (Optional if provided reproduction)
vite
orvite build
with the--debug
flag.The text was updated successfully, but these errors were encountered: