gdborton / webpack-parallel-uglify-plugin

A faster uglifyjs plugin.
466 stars 34 forks source link

source map not working #52

Closed Yangqin0607 closed 4 years ago

Yangqin0607 commented 6 years ago

I have used webpack-parallel-uglify-plugin. It does generate *.js.map, and the source files also contains comments like "sourceMappingURL=a-614d71f532b520f2be01.js.map". But when I open the page in browsers, it was empty. Here are my config file and the picture in browser. webpack: 3.11.0 webpack-parallel-uglify-plugin: 1.1.0

devtool='source-map';
plugins.push(
    new ParallelUglifyPlugin({
       sourceMap: true,
       uglifyJS: {
          mangle: {},
          compress: {
            warnings: false,
            properties: false,
          },
          output: { comments: false },
        },
    })
);
issue

If I use webpack.optimize.UglifyJsPlugin, every thing works fine.

 plugins.push(new webpack.optimize.UglifyJsPlugin({
          sourceMap: true,
          mangle: {},
          compress: {
            warnings: false,
            properties: false,
          },
          output: {},
          comments: false,
        }));

Could you please tell me what's wrong with my config file? Thank you so much!

Rainsho commented 6 years ago

me too ...

Rainsho commented 6 years ago

It seems that uglifyJS works fine to me.

Yangqin0607 commented 6 years ago

so how do you solve this problem?

Rainsho commented 6 years ago

Not yet, since the code delivered to the plugin had already transformed by babel, for now we use uglifyJS to minify the code.

gdborton commented 4 years ago

@Yangqin0607 I'm going to be creating and linking to a sample project showing a simple config and demo w/ sourcemaps working. Closing this out for now, but if you're still having trouble please reopen and I'll try to help you out.