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
In a very simple Vite + React app, I am trying to keep comments in the code. To do so I've set minify to false, but in the final built index.js the comments are deleted.
You can reproduce the issue in this PoC, to do is, just run the following command npm i && npm run build and check that the index created inside the dist folder doesn't have the comments set in the App.js file.
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.
If you disable esbuild by esbuild: false, the comments will be preserved (repro).
But that of course means you cannot use any features powered by esbuild.
If you disable esbuild by esbuild: false, the comments will be preserved (repro). But that of course means you cannot use any features powered by esbuild.
Describe the bug
In a very simple Vite + React app, I am trying to keep comments in the code. To do so I've set
minify
to false, but in the final built index.js the comments are deleted.Reproduction
no link
Steps to reproduce
vite-project-comments.zip
You can reproduce the issue in this PoC, to do is, just run the following command
npm i && npm run build
and check that the index created inside the dist folder doesn't have the comments set in theApp.js
file.System Info
System: OS: macOS 15.1 CPU: (10) arm64 Apple M1 Pro Memory: 333.97 MB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.12.1 - /usr/local/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm Browsers: Chrome: 130.0.6723.93 Edge: 130.0.2849.68 Safari: 18.1 Safari Technology Preview: 18.0
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: