@xh/hoist-dev-utils 5.13.0 → 5.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configureWebpack.js +6 -1
- package/package.json +1 -1
package/configureWebpack.js
CHANGED
|
@@ -55,6 +55,8 @@ try {reactPkg = require('react/package')} catch (e) {reactPkg = {version: 'NOT_F
|
|
|
55
55
|
* hoist-react developers to test plugin changes. Dev-mode only.
|
|
56
56
|
* @param {boolean} [env.inlineHoistOpenFin=false] - true to use a locally checked-out copy of the
|
|
57
57
|
* hoist-openfin plugin - as with `inlineHoist` above. Dev-mode only.
|
|
58
|
+
* @param {boolean} [env.reactProdMode=false] - true to use the production build of React
|
|
59
|
+
* when running the dev server.
|
|
58
60
|
* @param {string} env.agGridLicenseKey - key for ag-Grid enterprise license purchased / supplied
|
|
59
61
|
* for this application and your organization. Applicable only to Hoist React v34 and prior -
|
|
60
62
|
* as of v35 license key management is now handled exclusively within the application codebase.
|
|
@@ -128,6 +130,7 @@ async function configureWebpack(env) {
|
|
|
128
130
|
prodBuild = env.prodBuild === true,
|
|
129
131
|
inlineHoist = !prodBuild && env.inlineHoist === true,
|
|
130
132
|
inlineHoistOpenFin = !prodBuild && env.inlineHoistOpenFin === true,
|
|
133
|
+
reactProdMode = prodBuild || env.reactProdMode === true,
|
|
131
134
|
resolveAliases = Object.assign({}, env.resolveAliases),
|
|
132
135
|
analyzeBundles = env.analyzeBundles === true,
|
|
133
136
|
checkForDupePackages = env.checkForDupePackages !== false,
|
|
@@ -165,6 +168,7 @@ async function configureWebpack(env) {
|
|
|
165
168
|
|
|
166
169
|
process.env.BABEL_ENV = prodBuild ? 'production' : 'development';
|
|
167
170
|
process.env.NODE_ENV = prodBuild ? 'production' : 'development';
|
|
171
|
+
process.env.REACT_NODE_ENV = reactProdMode ? 'production' : 'development';
|
|
168
172
|
|
|
169
173
|
logSep();
|
|
170
174
|
logMsg(`Building ${appName} v${appVersion}`);
|
|
@@ -175,6 +179,7 @@ async function configureWebpack(env) {
|
|
|
175
179
|
if (!prodBuild) logMsg('💻 Development mode enabled');
|
|
176
180
|
if (inlineHoist) logMsg('🏗️ Inline Hoist enabled');
|
|
177
181
|
if (inlineHoistOpenFin) logMsg('🏗️ Inline Hoist-OpenFin enabled');
|
|
182
|
+
if (reactProdMode) logMsg('⚛️ React Production mode enabled');
|
|
178
183
|
if (analyzeBundles) logMsg('🎁 Bundle analysis enabled');
|
|
179
184
|
logSep();
|
|
180
185
|
logMsg('📚 Key libraries:');
|
|
@@ -549,7 +554,7 @@ async function configureWebpack(env) {
|
|
|
549
554
|
|
|
550
555
|
// Inject global constants at compile time.
|
|
551
556
|
new webpack.DefinePlugin({
|
|
552
|
-
'process.env': {NODE_ENV: JSON.stringify(process.env.
|
|
557
|
+
'process.env': {NODE_ENV: JSON.stringify(process.env.REACT_NODE_ENV)},
|
|
553
558
|
xhAppCode: JSON.stringify(appCode),
|
|
554
559
|
xhAppName: JSON.stringify(appName),
|
|
555
560
|
xhAppVersion: JSON.stringify(appVersion),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist-dev-utils",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.14.0",
|
|
4
4
|
"description": "Utilities for configuring builds of Hoist-React client applications.",
|
|
5
5
|
"repository": "github:xh/hoist-dev-utils",
|
|
6
6
|
"homepage": "https://github.com/xh/hoist-dev-utils",
|