-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Unnecessary Buffer polyfill when source maps are disabled #454
Comments
@alexwalter88 https://github.com/webpack-contrib/css-loader/blob/master/lib/loader.js#L113 Normally it should exaclty do that, but guessing the |
Mind testing quickly testing that out ? 😛 |
Nope that doesn't seem to work. I tried removing the function too and just inlining it the |
Alright I need to ask Tobias what to do about it at best, I come back when I know more :). Meanwhile please continue using your workaround 😛 |
I guess the question is, how to rewrite
without relying on |
See MDN. Either |
Closed by #501 |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
After upgrading from css-loader
0.26.4
to0.27.3
webpack is including a polyfill for Buffer in the bundle when source maps are not enabled. This is resulting in an increased bundle size, even though the polyfill is never actually used.If the current behavior is a bug, please provide the steps to reproduce.
Install css-loader
0.23.7
, run a webpack build, and check the resulting bundle.What is the expected behavior?
If source maps are not enabled, then there is no need to output the
toComment
function inlib/css-base.js
, which uses Buffer. The loader should only output this function if source maps are enabled.Please mention other relevant information such as your webpack version, Node.js version and Operating System.
Windows 8.1
Node 6.9.5
Webpack 2.2.1
My current workaround is just adding
to the webpack config, but I think it would be better if the loader could handle this.
The text was updated successfully, but these errors were encountered: