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
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
If a js file contains strings which are defined in the
define
config, such asprocess.env.NODE_ENV
, errors will occur when import it with?raw
.The origin js file
After
?raw
processing (http://127.0.0.1:5173/src/test.js?raw)It looks like the string replacement happens after the
?raw
processing causing this error.Reproduction
https://github.com/Tsuk1ko/vite-define-with-raw-loader-issue
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: