webpack-contrib/uglifyjs-webpack-plugin

How to change sourceMapUrl by uglifyOptions - sourceMap option?

lazyhero opened this issue · 2 comments

VERSION

  • uglifyjs-webpack-plugin version:1.1.6
  • webpack 4.16.0

USECASE

new UglifyJsPlugin({
cache: true,
parallel: true,
compress: {
collapse_vars: false
},
// set to true if you want JS source maps
sourceMap: true,
uglifyOptions: {
sourceMap: {
filename: 'out.js',
url: 'http://a.b.com/out.js.map'
}
}
}),

RESULT

//# sourceMappingURL=404.22809d3ced6fccfdd4c7.js.map

EXPECT

//# sourceMappingURL=htttp://a.b.com/404.22809d3ced6fccfdd4c7.js.map

uglifyOptions>sourceMap can not work

update:
uglifyjs-webpack-plugin version:1.3.0

i don't want use 'sourcemapdevtoolplugin'

Only using sourcemapdevtoolplugin