@lynx-js/react-webpack-plugin-canary 0.12.0-canary-20260924-0c326250 → 0.12.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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lynx-js/react-webpack-plugin
2
2
 
3
- ## 0.12.0-canary-20260924044521-0c326250b7070f3ddbbd37aa614888c75e2e4aad
3
+ ## 0.12.0
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -10,11 +10,11 @@
10
10
 
11
11
  - Fix `RangeError: Maximum call stack size exceeded` when lazy chunks import each other. ([#3930](https://github.com/lynx-family/lynx-stack/pull/3930))
12
12
 
13
+ - Add `registerRuntimeVersion()` and `getRuntimeVersion()` to record the host's `@lynx-js/react` runtime version and report versions from standalone lazy bundles. The build stamps each bundle with `__RUNTIME_VERSION__`; bundles built by older plugins that do not stamp the version are unaffected. ([#4035](https://github.com/lynx-family/lynx-stack/pull/4035))
14
+
13
15
  - Keep both layers of a lazy bundle that a `webpackChunkName` names. The name is the identity of a chunk group, so writing one collapsed the main-thread and the background compilation into a single chunk: the bundle shipped with an empty `lepusCode`, and its intermediate outputs landed outside of `.lynx/lazy-bundle/<name>/`. The transform now appends `-react__<layer>` to a user-written name and the plugin strips it again, the way it did for the names the transform used to inject, so a named lazy bundle is built exactly like an unnamed one. ([#4002](https://github.com/lynx-family/lynx-stack/pull/4002))
14
16
 
15
17
  - Optimize single string literal and template literal children of `<text>` into `text` attributes when `engineVersion` is at least 3.1, avoiding separate raw text nodes while preserving expression values and updates. ([#3984](https://github.com/lynx-family/lynx-stack/pull/3984))
16
- - Updated dependencies [[`b5241dd`](https://github.com/lynx-family/lynx-stack/commit/b5241dd52770e97cb9bc5f08d9aa3bdbf7be9ce8), [`c5809d0`](https://github.com/lynx-family/lynx-stack/commit/c5809d097d6cd3c29ba8a140288fce0846b60b2c), [`4c453b9`](https://github.com/lynx-family/lynx-stack/commit/4c453b9ed1c58860f96cde9c4e91722f5d145470)]:
17
- - @lynx-js/template-webpack-plugin@0.16.2-canary-20260924044521-0c326250b7070f3ddbbd37aa614888c75e2e4aad
18
18
 
19
19
  ## 0.11.4
20
20
 
@@ -90,6 +90,16 @@ interface ReactWebpackPluginOptions {
90
90
  * @public
91
91
  */
92
92
  lazyBundleFetcher?: 'FetchBundle' | 'QueryComponent';
93
+ /**
94
+ * The `@lynx-js/react` runtime version the app being compiled depends on.
95
+ * Stamped into the bundle as `__RUNTIME_VERSION__` so a lazy bundle can be
96
+ * checked at runtime against the host's runtime version. Resolved by the
97
+ * caller (e.g. `pluginReactLynx`) against the app root; left `undefined` when
98
+ * it cannot be determined.
99
+ *
100
+ * @public
101
+ */
102
+ runtimeVersion?: string | undefined;
93
103
  }
94
104
  /**
95
105
  * ReactWebpackPlugin allows using ReactLynx with webpack
@@ -191,6 +191,7 @@ class ReactWebpackPlugin {
191
191
  experimental_useElementTemplate: false,
192
192
  experimental_transformBuiltinAttributeNames: false,
193
193
  lazyBundleFetcher: 'QueryComponent',
194
+ runtimeVersion: undefined,
194
195
  }); }
195
196
  /**
196
197
  * The entry point of a webpack plugin.
@@ -239,6 +240,7 @@ class ReactWebpackPlugin {
239
240
  __USE_ELEMENT_TEMPLATE__: JSON.stringify(options.experimental_useElementTemplate),
240
241
  __EXPERIMENTAL_TRANSFORM_BUILTIN_ATTRIBUTE_NAMES__: JSON.stringify(options.experimental_transformBuiltinAttributeNames),
241
242
  __LAZY_BUNDLE_FETCHER__: JSON.stringify(options.lazyBundleFetcher),
243
+ __RUNTIME_VERSION__: JSON.stringify(options.runtimeVersion),
242
244
  }).apply(compiler);
243
245
  const entryPairs = options.entryPairs ?? [];
244
246
  if (entryPairs.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-webpack-plugin-canary",
3
- "version": "0.12.0-canary-20260924-0c326250",
3
+ "version": "0.12.0",
4
4
  "description": "A webpack plugin for ReactLynx",
5
5
  "keywords": [
6
6
  "webpack",
@@ -39,8 +39,8 @@
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.2-canary-20260924-0c326250",
43
- "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.16.2-canary-20260924-0c326250",
42
+ "@lynx-js/react": "npm:@lynx-js/react-canary@0.126.2",
43
+ "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.16.2",
44
44
  "@lynx-js/test-tools": "0.0.0",
45
45
  "@microsoft/api-extractor": "7.59.1",
46
46
  "@rspack/core": "2.2.7",