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
Import suffixes such as ?url and ?worker&url are not correctly applied during development builds when importing from node_modules. This causes builds to fail in dev mode, while production builds work as expected.
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
Import suffixes such as
?url
and?worker&url
are not correctly applied during development builds when importing from node_modules. This causes builds to fail in dev mode, while production builds work as expected.Reproduction
https://github.com/fernandojbf/vite-suffix-bug
Steps to reproduce
Vite Project
Navigate to the
vite-example
folder:cd vite-example
Install dependencies and run the project in development mode:
Build will fail.
Build for production and run:
Check logs.
React Router Project
Navigate to the
react-router-example
folder:cd react-router-example
Install dependencies and run in development mode:
Build will fail.
Build for production and run:
Check logs.
System Info
Used Package Manager
yarn
Logs
✘ [ERROR] No matching export in "node_modules/suffix-node-modules/js.js?url" for import "default"
✘ [ERROR] No matching export in "node_modules/suffix-node-modules/js.js?worker&url" for import "default"
vite-suffix-bug/vite-example/node_modules/esbuild/lib/main.js:1476
let error = new Error(text);
Validations
The text was updated successfully, but these errors were encountered: