Describe the regression
Starting 7.1.8, vite-rolldown started to remove comments even when minify: false is set. In my case, I have comments like these in my library code, and I need to ship my library with them.
/* @vite-ignore */
/* webpackIgnore: true */
in 7.1.7, comments were preserved when minify: false
Reproduction
https://stackblitz.com/edit/vitejs-rolldown-vite-jqpqhd91?file=vite.config.js
Expected Behavior
When minify: false comments are not removed
Actual Behavior
Comments are removed
Steps to Reproduce
- run build in 7.1.8 and see dist/main.js - no comments
- run build in 7.1.7 and see dist/main.js - comments preserved
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 20.19.1 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.8.2 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
rolldown-vite: 7.1.8
Used Package Manager
npm
Logs
No response
Validations
Describe the regression
Starting 7.1.8, vite-rolldown started to remove comments even when
minify: falseis set. In my case, I have comments like these in my library code, and I need to ship my library with them.in 7.1.7, comments were preserved when
minify: falseReproduction
https://stackblitz.com/edit/vitejs-rolldown-vite-jqpqhd91?file=vite.config.js
Expected Behavior
When
minify: falsecomments are not removedActual Behavior
Comments are removed
Steps to Reproduce
System Info
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 20.19.1 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.8.2 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm npmPackages: rolldown-vite: 7.1.8Used Package Manager
npm
Logs
No response
Validations