Use of eval
adds imported CSS to JS bundle in addition to separate CSS file in library mode
#3211
Closed
6 tasks done
Labels
Describe the bug
When using
eval
in any of the source files in library mode, the build output contains any imported CSS in the JS bundle in addition to the separate CSS bundle.Reproduction
I've created a repository which shows the issue with very little changes to the default template generated by
npm init @vitejs/app
and choosing "vanilla", then "JavaScript". It adds avite.config.js
switching to library mode and addseval("console.log('main.js')")
to themain.js
file.System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: npm.
Logs
Before submitting the issue, please make sure you do the following
The text was updated successfully, but these errors were encountered: