Updated devtool option to a full source-map #1354
Merged
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.
After reviewing the devtool options from Webpack the
cheap-source-map
option does not make much sense when wanting to have sourcemaps in production.Sourcemaps in production are usually used for error reporting tools to unminify code within your error reporting tool. Tools like:
The majority of Webpack plugins that provide support for these error reporting services default to
source-map
as the primary production devtool option. The Webpack documentation also specifies theeval-source-map
option as follows:https://webpack.js.org/configuration/devtool/#special-cases
On the other hand for the
source-map
option it states:https://webpack.js.org/configuration/devtool/#production
A full source map provides
original code
quality which is needed for services like these, to work as efficiently as possible.https://webpack.js.org/configuration/devtool/#devtool
If there are cases against using a full
source-map
for the devtool option in production I would love to hear them.Development sourcemap
I have also updated the development default.
inline-source-map
is also specified under special cases whereaseval-source-map
is specified for development. It has a slower initial build but faster rebuilds and also has original build quality for the mapping.