webpack: Change devtool sourcemap strategy.

Changed the devtoool setting for development from 'eval' to
'cheap-module-eval-source-map' as it has better support for
breakpoints in Google Chrome and the difference is time is
negligible at the number and size of files currently being
consumed by webpack. This stragtegy can be reviewed in the
future as the size of files grows or Chrome adds better
support.
This commit is contained in:
Armaan Ahluwalia
2018-04-18 19:59:08 +05:30
committed by Tim Abbott
parent fc7aa1a771
commit c70d26224d

View File

@@ -71,7 +71,12 @@ export default (env?: string) : webpack.Configuration => {
resolve: {
extensions: [".tsx", ".ts", ".js", ".json"],
},
devtool: production ? 'source-map' : 'eval',
// We prefer cheap-module-eval-source-map over eval because
// currently eval has trouble setting breakpoints per line
// in Google Chrome. There's almost no difference
// between the compilation time for the two and could be
// re-evaluated as the size of files grows
devtool: production ? 'source-map' : 'cheap-module-eval-source-map',
};
if (production) {
config.plugins = [