Clean up comments around Webpack modes

pull/14593/head
J. Ryan Stinnett 2020-07-17 14:57:48 +01:00
parent 869c379264
commit 3f0de699f0
1 changed files with 5 additions and 3 deletions

View File

@ -11,16 +11,18 @@ if (!og_image_url) og_image_url = 'https://app.element.io/themes/element/img/log
module.exports = (env, argv) => {
if (process.env.CI_PACKAGE) {
// Don't run minification for CI builds (this is only set for runs on develop)
// We override this via environment variable to avoid duplicating the scripts
// in `package.json` just for a different mode.
argv.mode = "development";
}
const development = {};
if (argv.mode !== "production") {
if (argv.mode === "production") {
development['devtool'] = 'nosources-source-map';
} else {
// This makes the sourcemaps human readable for developers. We use eval-source-map
// because the plain source-map devtool ruins the alignment.
development['devtool'] = 'eval-source-map';
} else {
development['devtool'] = 'nosources-source-map';
}
// Resolve the directories for the react-sdk and js-sdk for later use. We resolve these early so we