Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Map sourceMap to devtool #368

Open
stevenvachon opened this issue Oct 19, 2018 · 6 comments
Open

Map sourceMap to devtool #368

stevenvachon opened this issue Oct 19, 2018 · 6 comments

Comments

@stevenvachon
Copy link

stevenvachon commented Oct 19, 2018

  • Operating System: macOS 10.14
  • Node Version: 10.11.0
  • NPM Version: 6.4.1
  • webpack Version: 4.20.2
  • uglifyjs-webpack-plugin Version: 2.0.1

Currently, the sourceMap option must be explicitly defined when it'd be much more convenient for it to rely on the value of Webpack's devtool option.

@alexander-akait
Copy link
Member

alexander-akait commented Oct 19, 2018

@stevenvachon please format your issue using issue template and reopen

@stevenvachon
Copy link
Author

I'm not allowed to reopen an issue that's been closed by a collaborator.

@alexander-akait
Copy link
Member

/cc @michael-ciniawsky

@heisian
Copy link

heisian commented May 28, 2019

Yeah, this is an unfortunate side-effect - if one sets devtool in the base Webpack config, UglifyJsPlugin should read that config and respond accordingly..

Or at least emit some sort of warning - currently there is no way to tell from build output that sourceMap is needed. If you have 10+ plugins, how do you know which one is causing the issue?

It is actually, IMO, a bug that souceMap: true doesn't get set by UglifyJsPlugin because it alters the way the base Webpack configuration affects the build process.

@heisian
Copy link

heisian commented May 28, 2019

@alexander-akait
Copy link
Member

It was fixed in next major release, because it is breaking change

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants