terinjokes / gulp-uglify

Minify files with UglifyJS
MIT License
1.23k stars 154 forks source link

Produce correct sourcemaps based on existing sourcemaps #348

Open slavafomin opened 5 years ago

slavafomin commented 5 years ago

Hello and thank you for this great module!

I'm compiling my source code using Rollup + Babel, so I'm getting a single JavaScript file (flat module) and a sourcemap for it (mapping from this flat module to the original sources) as an output.

Is there a way to take this flat module and the generated sourcemap in order to produce the minified flat module and an updated sourcemap (mapping from uglified content to the original source files) using gulp-uglify?

By the way, I'm running Rollup as a separate pre-build state, I'm not running it through Gulp.

Any suggestions will be highly appreciated. Thank you!