webpack: Cheap source maps do not work with UglifyJsPlugin
I’m submitting a bug report
Webpack version: 1.13.1
Please tell us about your environment: OSX 10.11.5
Current behavior:
Source maps either error or generate empty files when using UglifyJsPlugin and cheap
inside devtool
Expected/desired behavior:
cheap
variants generate correct files when using UglifyJsPlugin
To Reproduce:
- Clone https://github.com/mrooding/webpack-babel-integration-example
- Change config to https://gist.github.com/wenbochang/b1561d4a4c20faa4f854ab28112ce8c5
This is what I get for different devtool
options running webpack:
source-map
- workscheap-source-map
- Error: Failed to parse SourceMapcheap-module-source-map
- No error, butbundle.js
is empty inside webpack://cheap-eval-module-source-map
- Nobundle.js.map
file gets generated
Browser: Chrome 51
Language: ES6
Thanks in advance for your time!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 15 (5 by maintainers)
Commits related to this issue
- Improve documentation on devtool fixes webpack/webpack#2725 fixes webpack/webpack#4936 fixes webpack/webpack#2766 fixes webpack/webpack#2145 fixes webpack/webpack#1689 — committed to webpack/webpack.js.org by sokra 7 years ago
- Improve documentation on devtool fixes webpack/webpack#2725 fixes webpack/webpack#4936 fixes webpack/webpack#2766 fixes webpack/webpack#2145 fixes webpack/webpack#1689 — committed to webpack/webpack.js.org by sokra 7 years ago
- docs(config): improve devtool documentation (#1533) Elaborate on the `devtool` options and explain in more detail how each one affects the output source mapping and compilation speed. fixes #273 ... — committed to webpack/webpack.js.org by sokra 7 years ago
I can confirm that this bug happens in webpack@2.1.0-beta13. Steps to reproduce
devtool
to'source-map'
new webpack.optimize.UglifyJsPlugin()
to the list of pluginsUglifyJsPlugin
We seem to have the opposite:
source-map
- Error: Failed to parse SourceMapcheap-source-map
- worksWebpack 1.13.1, Ubuntu, Chrome