@xh/hoist-dev-utils 13.0.0-SNAPSHOT.1781101429775 → 13.0.1
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 -0
- package/package.json +1 -1
package/configureWebpack.js
CHANGED
|
@@ -621,6 +621,12 @@ async function configureWebpack(env) {
|
|
|
621
621
|
// Inject global constants at compile time.
|
|
622
622
|
new webpack.DefinePlugin({
|
|
623
623
|
'process.env.NODE_ENV': JSON.stringify(process.env.REACT_NODE_ENV),
|
|
624
|
+
// Fallback for any other `process.env.*` reference - some libraries (e.g.
|
|
625
|
+
// react-draggable >= 4.5) ship raw `process.env.X` debug gates in their published
|
|
626
|
+
// browser builds, which otherwise throw a ReferenceError at runtime (browsers
|
|
627
|
+
// have no `process` global). Most-specific keys win, so NODE_ENV above still
|
|
628
|
+
// resolves to its real value.
|
|
629
|
+
'process.env': '{}',
|
|
624
630
|
xhAppCode: JSON.stringify(appCode),
|
|
625
631
|
xhAppName: JSON.stringify(appName),
|
|
626
632
|
xhAppVersion: JSON.stringify(appVersion),
|