@lynx-js/react-webpack-plugin-canary 0.11.4 → 0.11.5-canary-20260912-388e50e4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lynx-js/react-webpack-plugin
2
2
 
3
+ ## 0.11.5-canary-20260912143122-388e50e42106e5f11751b317b82c0313089b29b2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix `RangeError: Maximum call stack size exceeded` when lazy chunks import each other. ([#3930](https://github.com/lynx-family/lynx-stack/pull/3930))
8
+
3
9
  ## 0.11.4
4
10
 
5
11
  ### Patch Changes
@@ -62,7 +62,7 @@ export function applyDefinesInjection(compiler, entryPairs, pluginName) {
62
62
  return module ? [module] : [];
63
63
  });
64
64
  };
65
- const processScope = async (backgroundRoots, mainThreadRoots, inheritedPresent, request, inject) => {
65
+ const processScope = async (backgroundRoots, mainThreadRoots, inheritedPresent, ancestors, request, inject) => {
66
66
  const background = traverse(backgroundRoots);
67
67
  const mainThread = traverse(mainThreadRoots);
68
68
  const present = {
@@ -87,17 +87,17 @@ export function applyDefinesInjection(compiler, entryPairs, pluginName) {
87
87
  }
88
88
  for (const [resource, backgroundBoundary] of background.asyncBoundaries) {
89
89
  const mainThreadBoundary = mainThread.asyncBoundaries.get(resource);
90
- if (!mainThreadBoundary) {
90
+ if (!mainThreadBoundary || ancestors.has(resource)) {
91
91
  continue;
92
92
  }
93
- await processScope([backgroundBoundary], [mainThreadBoundary], present, `${resource}.__lynx-react-defines.js`, async (boundaryRequest) => {
93
+ await processScope([backgroundBoundary], [mainThreadBoundary], present, new Set([...ancestors, resource]), `${resource}.__lynx-react-defines.js`, async (boundaryRequest) => {
94
94
  definesImports.set(boundaryKey(mainThreadBoundary.layer, resource), boundaryRequest);
95
95
  await rebuildModule(mainThreadBoundary);
96
96
  });
97
97
  }
98
98
  };
99
99
  await Promise.all(entryPairs.map(async ({ mainThread, background }) => {
100
- await processScope(entryRoots(background), entryRoots(mainThread), { snapshot: [], worklet: [] }, path.join(compiler.context, `__lynx-react-defines.${mainThread}.js`), async (request) => {
100
+ await processScope(entryRoots(background), entryRoots(mainThread), { snapshot: [], worklet: [] }, new Set(), path.join(compiler.context, `__lynx-react-defines.${mainThread}.js`), async (request) => {
101
101
  const addEntry = (entryRequest) => new Promise((resolve, reject) => {
102
102
  compilation.addEntry(compiler.context, EntryPlugin.createDependency(entryRequest), { name: mainThread, layer: LAYERS.MAIN_THREAD }, (err) => err ? reject(err) : resolve());
103
103
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-webpack-plugin-canary",
3
- "version": "0.11.4",
3
+ "version": "0.11.5-canary-20260912-388e50e4",
4
4
  "description": "A webpack plugin for ReactLynx",
5
5
  "keywords": [
6
6
  "webpack",
@@ -39,10 +39,10 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.11.0",
42
- "@lynx-js/react": "npm:@lynx-js/react-canary@0.126.1",
42
+ "@lynx-js/react": "npm:@lynx-js/react-canary@0.126.2-canary-20260912-388e50e4",
43
43
  "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.16.1",
44
44
  "@lynx-js/test-tools": "0.0.0",
45
- "@microsoft/api-extractor": "7.58.12",
45
+ "@microsoft/api-extractor": "7.59.1",
46
46
  "@rspack/core": "2.2.2",
47
47
  "@rspack/lite-tapable": "1.1.5",
48
48
  "@rstest/core": "0.11.12",