-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: rsbuild injectStyles: true and chunkSplit: all-in-one will inject lots \n and blank space with cssnano useless #3247
Comments
@chenjiahan this PR resolves some case with css \n; but we can found lots of \n in sourcemap and js files; |
This is as expected, the source map contains the source code |
Can you provide a reproduction? |
https://github.com/sbyps/rspack-demo/tree/main pnpm run build cat dist/504.js dist/record-portrait.js |
Fixed in https://github.com/web-infra-dev/rsbuild/releases/tag/v1.0.1-rc.5, can you have a try? |
after bump rc.5, the css files don't have \n any more, but js files has \n as same; https://github.com/sbyps/rspack-demo/tree/main pnpm run build cat dist/record-portrait.js |
I think it's unrelated to Rsbuild |
Version
Details
following the official docs: https://rsbuild.dev/zh/config/output/inject-styles#%E4%BD%BF%E7%94%A8%E5%9C%BA%E6%99%AF
then set config like
injectStyles: true,
chunkSplit: all-in-one
will inject lots \n and blank space with cssnano useless in js files
Reproduce link
https://github.com/sbyps/rspack-demo
Reproduce Steps
npm run build
cat the js files, search "\n ", will find lots of it
The text was updated successfully, but these errors were encountered: