Skip to content

Conversation

@MrJohz
Copy link

@MrJohz MrJohz commented Oct 24, 2018

The process isn't brilliant - for some reason, when the maps pass through both babel and uglify, the line numbers seem to get a bit screwy. Each transform on its own works absolutely fine. That said, I figured that for most people, it would be preferably to have the original source, rather than super-precise line numbers. Besides, once you actually get into the meat of the code, the line numbers match up again, it's just the initialisation at the very start of the file that seems to not work so well.

The alternative would be to remove the {loadMaps: true} option on line 18 of the gulpfile. This would mean that dist/angular-vs-repeat.js would map to the original file, but dist/angular-vs-repeat.min.js would only map to dist/angular-vs-repeat.js (i.e. only display the changes of minification, not the original Babel transforms).

I also removed the gulp-clean dependency and import, because it wasn't used at all.

(Sourcemap demo: here.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant