Generate source maps during development only and remove from production release #6
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.
@nicolas-jaussaud I wanted to ask your opinion on this new feature.
I added a global config option (and per-task option) to generate source maps during development only (
roll dev
) and remove them for production (roll build
).My motivation was to reduce the size of the plugin for L&L. I found that WordPress and Gutenberg projects are also not publishing their source maps. But ACF does.
There are arguments in support of including source maps in production release, as can be seen in this discussion:
The main advantage is that it improves debugging any JS issues that occur in production, so users can include a more helpful stack trace in the issue description. That's a pretty compelling reason, it's valuable and maybe worth a few extra megabytes.
In this case, a majority of devs preferred to not change the current default (no sourcemaps for prod), and instead added an option to enable it specifically.
From this, I was considering making it the default for Tangible Roller also.
Would you be OK with that, or would you prefer to publish source maps by default? In the latter case, I can make it opt-in and keep the current behavior.