@xh/hoist-dev-utils 15.0.0 → 15.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 +10 -6
- package/package.json +1 -1
package/configureWebpack.js
CHANGED
|
@@ -411,12 +411,16 @@ async function configureWebpack(env) {
|
|
|
411
411
|
// https://webpack.js.org/configuration/optimization/#optimizationremoveavailablemodules)
|
|
412
412
|
removeAvailableModules: false,
|
|
413
413
|
|
|
414
|
-
//
|
|
415
|
-
//
|
|
416
|
-
//
|
|
417
|
-
//
|
|
418
|
-
// the
|
|
419
|
-
|
|
414
|
+
// Disable package.json `sideEffects` based module pruning. When enabled ('flag' in
|
|
415
|
+
// v15.0.0), webpack elides hoist-react's barrel index modules and rewrites consumer
|
|
416
|
+
// imports to the underlying deep modules. Hoist-react's module graph is heavily
|
|
417
|
+
// circular and relies on those barrels evaluating in source order to initialize
|
|
418
|
+
// safely - without them, evaluation order follows the app's own import graph, and
|
|
419
|
+
// some orderings hit a class decorator or `extends` before its binding initializes,
|
|
420
|
+
// throwing `Cannot access '...' before initialization` (naming a hoist-react export)
|
|
421
|
+
// at startup. Must remain disabled until hoist-react's internal cycles are
|
|
422
|
+
// restructured to be ordering-independent - see hoist-react #4640.
|
|
423
|
+
sideEffects: false,
|
|
420
424
|
|
|
421
425
|
// Produce chunks for any shared imports across JS apps.
|
|
422
426
|
splitChunks: {
|