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
As stated in the title, in this example, the define section replaces the version field exported by the vue package with the data I defined, causing a critical error.
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.
It's expected for the define replacement to handle inside node_modules, you can add things like process.env.LIB_VALUE: ".." that will be replaced in the library, depending if you need to.
For this specific case, you're using Vite 4 which had a much looser replacement handling that can caused issues like this. It should be fixed in Vite 5 now, which worked for me when I upgrade it in the repro.
Describe the bug
As stated in the title, in this example, the define section replaces the
version
field exported by the vue package with the data I defined, causing a critical error.Reproduction
https://stackblitz.com/edit/vitejs-vite-jiy9qb?file=main.js
Steps to reproduce
just run
npm build
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: