feat: add sourcemaps for dist builds #744
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #743
Notes
I had to update the lockfile as a new dependency was needed and the lockfile format was quite old.
npm ci
was not working completely asgrunt-saucelabs
is a GitHub reference so it's ignored by that command. npm@6 uses a different format and the~
versioning is no longer recommended,^
is. The first two commits reflect these changes. If you'd rather I create a separate PR for this, or have a way to avoid changing the lock file, let me know.For the source maps, Browserify's source maps are embedded into the file, so I had to use
grunt-extract-sourcemap
to extract them to a map file to avoid bloat. There is also an issue withgrunt-browserify
(jmreidy/grunt-browserify#362) where banners might conflict with sourcemaps but I haven't confirmed it myself. Consideringgrunt-browserify
hasn't been updated for 2 years, (and a lot of Grunt plugins in general), I'm not sure what can be done other than moving away from Grunt.