Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source maps, fixes #2 #40

Merged
merged 2 commits into from Feb 28, 2018
Merged

Source maps, fixes #2 #40

merged 2 commits into from Feb 28, 2018

Conversation

goto-bus-stop
Copy link
Member

Use magic-string for source map generation. Magic-string can also handle
string replacements but static-module already does that well with
streams. This patch only uses the source map generation capabilities of
magic-string.

If the source string contains a source mapping comment, the static-module
changes are merged into it, so the final source map points back to the
original source.

Source maps are opt in using the sourceMap: true option.

Use magic-string for source map generation. Magic-string can also handle
string replacements but static-module already does that well with
streams. This patch only uses the source map generation capabilities of
magic-string.
@goto-bus-stop goto-bus-stop merged commit a2562b6 into master Feb 28, 2018
@goto-bus-stop goto-bus-stop deleted the source-map branch March 7, 2018 14:09
@mattdesl
Copy link
Collaborator

mattdesl commented Mar 8, 2018

Just a note – I haven't got detailed benchmarks but my bundle time has gone up dramatically in recent browserify versions (as in, 3 seconds to 7 seconds) and I suspect it's because of this change and source map generation.

@goto-bus-stop
Copy link
Member Author

Dang. Source mapping takes surprisingly little time on my machine but maybe I'm playing with too few transforms or files. Do you have a project you're seeing these numbers on that i could try out?

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.

None yet

3 participants