mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
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:
committed by
Tim Abbott
parent
fc7aa1a771
commit
c70d26224d
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user