Skip to content
This repository was archived by the owner on Aug 6, 2021. It is now read-only.

Commit c55222a

Browse files
committed
Fix hardsource plugin usage in release builds
1 parent 27426e1 commit c55222a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

config/Webpack/plugins.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = ({
1313
OUTPUT_DIR,
1414
PRODUCTION,
1515
DEVELOPMENT,
16-
TRAVIS_ENV
16+
RELEASE_MODE
1717
}) => {
1818
const plugins = [
1919
new webpack.NoEmitOnErrorsPlugin(),
@@ -51,7 +51,7 @@ module.exports = ({
5151
];
5252

5353
// only use these outside of travis environment
54-
if (!TRAVIS_ENV) {
54+
if (!RELEASE_MODE) {
5555
// improved caching after multiple builds
5656
plugins.push(
5757
new HardSourceWebpackPlugin({

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"webpack:dev": "cross-env NODE_ENV=development node --max_old_space_size=4092 ./node_modules/webpack/bin/webpack.js --debug --watch --progress --colors",
2222
"prettier": "./node_modules/.bin/prettier --tab-width 4 --write \"src/**/**.+(js|jsx|ts|tsx)\"",
2323
"prerelease": "npm run update-release-files && gulp build --env=production && yarn run webpack",
24-
"release": "build",
24+
"release": "cross-env RELEASE_MODE=true build",
2525
"release:appx": "build -w appx",
2626
"start": "gulp start --env=development",
2727
"start:dev": "cross-env NODE_ENV=development gulp start --env=development",

webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const optimizations = require("./config/Webpack/optimizations");
66

77
const PRODUCTION = process.env.NODE_ENV === "production";
88
const DEVELOPMENT = !PRODUCTION;
9-
const TRAVIS_ENV = !!process.env.TRAVIS;
9+
const RELEASE_MODE = !!process.env.RELEASE_MODE;
1010

1111
const SRC_DIR = path.resolve(__dirname, "src/react");
1212
const BUILD_DIR = path.resolve(__dirname, "app/react");
@@ -17,7 +17,7 @@ const moduleOptions = {
1717
OUTPUT_DIR,
1818
PRODUCTION,
1919
DEVELOPMENT,
20-
TRAVIS_ENV
20+
RELEASE_MODE
2121
};
2222

2323
let config = {

0 commit comments

Comments
 (0)