Skip to content

Commit 3f0de69

Browse files
committed
Clean up comments around Webpack modes
1 parent 869c379 commit 3f0de69

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎webpack.config.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@ if (!og_image_url) og_image_url = 'https://app.element.io/themes/element/img/log
1111
module.exports = (env, argv) => {
1212
if (process.env.CI_PACKAGE) {
1313
// Don't run minification for CI builds (this is only set for runs on develop)
14+
// We override this via environment variable to avoid duplicating the scripts
15+
// in `package.json` just for a different mode.
1416
argv.mode = "development";
1517
}
1618

1719
const development = {};
18-
if (argv.mode !== "production") {
20+
if (argv.mode === "production") {
21+
development['devtool'] = 'nosources-source-map';
22+
} else {
1923
// This makes the sourcemaps human readable for developers. We use eval-source-map
2024
// because the plain source-map devtool ruins the alignment.
2125
development['devtool'] = 'eval-source-map';
22-
} else {
23-
development['devtool'] = 'nosources-source-map';
2426
}
2527

2628
// Resolve the directories for the react-sdk and js-sdk for later use. We resolve these early so we

0 commit comments

Comments
 (0)