mirror of
https://github.com/vector-im/element-web.git
synced 2024-09-09 22:55:12 +00:00
Use React production for CI builds
When running Nightly build we want to benefit from the fast runtime that React production offers and get rid of the runtime overhead that comes with development. We are setting NODE_ENV and not "webpack.mode" to not loose sourcemaps and have minified sources in that environment
This commit is contained in:
parent
f06eb14c48
commit
0532c9c37b
1 changed files with 14 additions and 0 deletions
|
@ -18,6 +18,20 @@ module.exports = (env, argv) => {
|
||||||
// We override this via environment variable to avoid duplicating the scripts
|
// We override this via environment variable to avoid duplicating the scripts
|
||||||
// in `package.json` just for a different mode.
|
// in `package.json` just for a different mode.
|
||||||
argv.mode = "development";
|
argv.mode = "development";
|
||||||
|
|
||||||
|
// More and more people are using nightly build as their main client
|
||||||
|
// Libraries like React have a development build that is useful
|
||||||
|
// when working on the app but adds significant runtime overhead
|
||||||
|
// We want to use the React production build but not compile the whole
|
||||||
|
// application to productions standards
|
||||||
|
additionalPlugins.concat([
|
||||||
|
new webpack.EnvironmentPlugin({
|
||||||
|
"NODE_ENV": "production",
|
||||||
|
}),
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
"process.env.NODE_ENV": "production",
|
||||||
|
}),
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const development = {};
|
const development = {};
|
||||||
|
|
Loading…
Reference in a new issue