forked from matrix/element-web
Clean up comments around Webpack modes
This commit is contained in:
parent
869c379264
commit
3f0de699f0
|
@ -11,16 +11,18 @@ if (!og_image_url) og_image_url = 'https://app.element.io/themes/element/img/log
|
||||||
module.exports = (env, argv) => {
|
module.exports = (env, argv) => {
|
||||||
if (process.env.CI_PACKAGE) {
|
if (process.env.CI_PACKAGE) {
|
||||||
// Don't run minification for CI builds (this is only set for runs on develop)
|
// 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";
|
argv.mode = "development";
|
||||||
}
|
}
|
||||||
|
|
||||||
const 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
|
// This makes the sourcemaps human readable for developers. We use eval-source-map
|
||||||
// because the plain source-map devtool ruins the alignment.
|
// because the plain source-map devtool ruins the alignment.
|
||||||
development['devtool'] = 'eval-source-map';
|
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
|
// Resolve the directories for the react-sdk and js-sdk for later use. We resolve these early so we
|
||||||
|
|
Loading…
Reference in New Issue