-
Notifications
You must be signed in to change notification settings - Fork 69
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
Not working with UglifyJsPlugin() #32
Comments
I haven't heard of this problem before so it may be avoidable with
configuration.
I use Esmangle plugin myself. You could take a look at that as a stop gap
measure.
I am hoping other users can shed some light on this problem.
|
Can you please let me know what version of Webpack this is. I am a bit confused by this comment. Is it saying the problem: What is your interpretation? |
It was Webpack 1. I think that comment is referred to Webpack 2. |
I'm facing exactly the same issue. Development builds run fine, but production builds with
I'm using Webpack 1.13.3 |
This issue occurs because when we use the UglifyJsPlugin the sass-loader get the output style compressed and then the resolve-url-loader get the position of the declaration from compressed style and not the original. So the row and column passed to sourceMapConsumer.originalPositionFor function don't match with the sourcemap. |
And... there is the real bug! sass/node-sass#957 |
Thanks @pablodgonzalez for your investigation. |
@LunaBawa Please edit your comment and replace the image with useful text. At first glance I do not see how your project can build, so I wonder if it is related to this issue at all. The root cause of this issue is a SASS bug per @pablodgonzalez's post above. If the {outputStyle: 'expanded'} solution not solve your problem it is likely you have a separate issue. Given you are loading Place your assets next to the |
The sass issue sass/node-sass#957 appears to be still open. Presuming Sass is the root cause I'm inclined to close this issue. Certainly Sass is implied but it is not a direct dependency. That said please refer to #97 as version 3 may help any open issues. |
I'm going to close this issue since the bug is in Sass and webpack 4 changes the minification to use other means. Please refer to the Webpack 4 example in Please open a fresh issue for any ongoing problems and link to this one as needed. |
I use resolve-url-loader like that:
And it works.
But if I add UglifyJsPlugin() to the plugins
then resolve-url-loader seems not working, I get relative path errors like without resolve-url-loader.
I think UglifyJsPlugin breaks resolve-url-loader by switching all other loaders to the min mode, but not sure.
Can anyone help with it?
The text was updated successfully, but these errors were encountered: