can not find the source map file when use UglifyJsPlugin
See original GitHub issuegulp.task('test', function() {
gulp.src('frontends/scripts/index.js')
.pipe(webpack({
plugins: [
new webpack.webpack.optimize.UglifyJsPlugin({ minimize: true, sourceMap: true })
]
}))
.pipe(rename("index.min.js"))
.pipe(gulp.dest('frontends/build/scripts/'));
});
The index.min.js
is created and minified properly, but I can not find any source map file.
And there is no //# sourceMappingURL=index.min.map
at the end of index.min.js
file.
Considering UglifyJsPlugin does have sourceMap
option, is this a bug of webpack-stream
?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Source Maps Not Generated by WebPack - Stack Overflow
js file, I should get source map files that map to original code. I'm using the following config file and I'm not getting...
Read more >uglify-js - npm
UglifyJS can generate a source map file, which is highly useful for debugging your compressed JavaScript. To get a source map, pass --source-map...
Read more >Source Maps - SurviveJS
If you build the project now ( npm run build ), you should see source maps in the project output at the dist...
Read more >Source Map - node_modules - Gitlab
and an object is returned with the following properties: source : The original source file, or null if this information is not available....
Read more >Debugging JavaScript with Source Maps - Rollbar
If you already know how to generate a source map or just want to use the generated file, you can skip down to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Using
webpack 2.1.0-beta.21
, I needed to setsourceMap: true
onwebpack.optimize.UglifyJsPlugin
ANDdevtool: 'source-map'
.So in the end my configuration looked like this:
webpack.config.js
It doesn’t work with
devtool: 'cheap-module-source-map'