@lynx-js/react-webpack-plugin-canary 0.9.3 → 0.9.4-canary-20260528-d5162d28

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,19 @@
1
1
  # @lynx-js/react-webpack-plugin
2
2
 
3
+ ## 0.9.4-canary-20260528060930-d5162d283dffaec5e5f9d74bab3e0e92e892d13a
4
+
5
+ ### Patch Changes
6
+
7
+ - Support the unified `debug-metadata.json` format and depend on `@lynx-js/debug-metadata`. ([#2642](https://github.com/lynx-family/lynx-stack/pull/2642))
8
+
9
+ - Prefix Lynx runtime module names with `webpack/runtime/` (e.g. `Lynx async chunks` → `webpack/runtime/lynx async chunks`), matching the path-structured naming of the bundler's built-in runtime modules. The previous bare names had no path segment, so when they appear as a source-map `sources` entry under a `file://` module-filename template they collapsed into an invalid URL authority (the space-containing name became the host) and broke `SourceMapConsumer` parsing. ([#2642](https://github.com/lynx-family/lynx-stack/pull/2642))
10
+
11
+ - Widen peer ranges to admit the new minor versions of `@lynx-js/template-webpack-plugin` (^0.12.0) and `@lynx-js/rspeedy` (^0.15.0) shipping with the unified `debug-metadata.json` feature. ([#2642](https://github.com/lynx-family/lynx-stack/pull/2642))
12
+
13
+ - Updated dependencies [[`409594b`](https://github.com/lynx-family/lynx-stack/commit/409594b9c51bb0c13f01c7d3f16949b27ebfdced), [`d8be1ee`](https://github.com/lynx-family/lynx-stack/commit/d8be1ee6819c6bd43e4251e33ebb91d54aad35fd), [`409594b`](https://github.com/lynx-family/lynx-stack/commit/409594b9c51bb0c13f01c7d3f16949b27ebfdced)]:
14
+ - @lynx-js/debug-metadata@0.1.0-canary-20260528060930-d5162d283dffaec5e5f9d74bab3e0e92e892d13a
15
+ - @lynx-js/template-webpack-plugin@0.12.0-canary-20260528060930-d5162d283dffaec5e5f9d74bab3e0e92e892d13a
16
+
3
17
  ## 0.9.3
4
18
 
5
19
  ### Patch Changes
@@ -37,7 +51,6 @@
37
51
  ### Minor Changes
38
52
 
39
53
  - feat: add `globalPropsMode` option to `PluginReactLynxOptions` ([#2346](https://github.com/lynx-family/lynx-stack/pull/2346))
40
-
41
54
  - When configured to `"event"`, `updateGlobalProps` will only trigger a global event and skip the `runWithForce` flow.
42
55
  - Defaults to `"reactive"`, which means `updateGlobalProps` will trigger re-render automatically.
43
56
 
@@ -46,7 +59,6 @@
46
59
  - Fix sourcemap misalignment when wrapping lazy bundle main-thread chunks. ([#2361](https://github.com/lynx-family/lynx-stack/pull/2361))
47
60
 
48
61
  The lazy bundle IIFE wrapper is now injected in `processAssets` at `PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE + 1` by walking chunk groups instead of patching assets in `beforeEncode`.
49
-
50
62
  - With `experimental_isLazyBundle: true`, the wrapper is applied to lazy-bundle chunk groups.
51
63
  - Without lazy bundle mode, the wrapper is applied to async main-thread chunk groups generated by dynamic import.
52
64
 
@@ -126,16 +138,16 @@
126
138
  type InlineChunkConfig =
127
139
  | boolean
128
140
  | InlineChunkTest
129
- | { enable?: boolean | 'auto'; test: InlineChunkTest };
141
+ | { enable?: boolean | "auto"; test: InlineChunkTest };
130
142
  ```
131
143
 
132
144
  ```ts
133
- import { defineConfig } from '@lynx-js/rspeedy';
145
+ import { defineConfig } from "@lynx-js/rspeedy";
134
146
 
135
147
  export default defineConfig({
136
148
  output: {
137
149
  inlineScripts: ({ name, size }) => {
138
- return name.includes('foo') && size < 1000;
150
+ return name.includes("foo") && size < 1000;
139
151
  },
140
152
  },
141
153
  });
@@ -190,7 +202,6 @@
190
202
  - feat: fully support MTS ([#569](https://github.com/lynx-family/lynx-stack/pull/569))
191
203
 
192
204
  Now use support the following usage
193
-
194
205
  - mainthread event
195
206
  - mainthread ref
196
207
  - runOnMainThread/runOnBackground
@@ -219,7 +230,7 @@
219
230
  - Shake `useImperativeHandle` on the main-thread by default. ([#153](https://github.com/lynx-family/lynx-stack/pull/153))
220
231
 
221
232
  ```js
222
- import { forwardRef, useImperativeHandle } from '@lynx-js/react';
233
+ import { forwardRef, useImperativeHandle } from "@lynx-js/react";
223
234
 
224
235
  export default forwardRef(function App(_, ref) {
225
236
  useImperativeHandle(ref, () => {
@@ -227,7 +238,7 @@
227
238
  return {
228
239
  name() {
229
240
  // This should be considered as background only
230
- console.info('This should not exist in main-thread');
241
+ console.info("This should not exist in main-thread");
231
242
  },
232
243
  };
233
244
  });
@@ -287,14 +298,14 @@
287
298
  - e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
288
299
 
289
300
  ```js
290
- import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin';
291
- import { defineConfig } from '@lynx-js/rspeedy';
301
+ import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
302
+ import { defineConfig } from "@lynx-js/rspeedy";
292
303
 
293
304
  export default defineConfig({
294
305
  plugins: [
295
306
  pluginReactLynx({
296
307
  defineDCE: {
297
- __SOME_FALSE_DEFINE__: 'false',
308
+ __SOME_FALSE_DEFINE__: "false",
298
309
  },
299
310
  }),
300
311
  ],
@@ -306,20 +317,20 @@
306
317
  For example, `import` initialized by dead code will be removed:
307
318
 
308
319
  ```js
309
- import { foo } from 'bar';
320
+ import { foo } from "bar";
310
321
 
311
322
  if (__SOME_FALSE_DEFINE__) {
312
323
  foo();
313
- console.log('dead code');
324
+ console.log("dead code");
314
325
  } else {
315
- console.log('reachable code');
326
+ console.log("reachable code");
316
327
  }
317
328
  ```
318
329
 
319
330
  will be transformed to:
320
331
 
321
332
  ```js
322
- console.log('reachable code');
333
+ console.log("reachable code");
323
334
  ```
324
335
 
325
336
  ## 0.6.0
@@ -329,14 +340,14 @@
329
340
  - a30c83d: Add `compat.removeComponentAttrRegex`.
330
341
 
331
342
  ```js
332
- import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin';
333
- import { defineConfig } from '@lynx-js/rspeedy';
343
+ import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
344
+ import { defineConfig } from "@lynx-js/rspeedy";
334
345
 
335
346
  export default defineConfig({
336
347
  plugins: [
337
348
  pluginReactLynx({
338
349
  compat: {
339
- removeComponentAttrRegex: 'YOUR REGEX',
350
+ removeComponentAttrRegex: "YOUR REGEX",
340
351
  },
341
352
  }),
342
353
  ],
@@ -2,7 +2,7 @@ import { RuntimeGlobals as LynxRuntimeGlobals } from '@lynx-js/webpack-runtime-g
2
2
  export function createLynxProcessEvalResultRuntimeModule(webpack) {
3
3
  return class LynxProcessEvalResultRuntimeModule extends webpack.RuntimeModule {
4
4
  constructor() {
5
- super('Lynx process eval result', webpack.RuntimeModule.STAGE_ATTACH);
5
+ super('webpack/runtime/lynx process eval result', webpack.RuntimeModule.STAGE_ATTACH);
6
6
  }
7
7
  generate() {
8
8
  const chunk = this.chunk;
@@ -2,7 +2,7 @@
2
2
  // Licensed under the Apache License Version 2.0 that can be found in the
3
3
  // LICENSE file in the root directory of this source tree.
4
4
  import { createRequire } from 'node:module';
5
- import { UI_SOURCE_MAP_RECORDS_BUILD_INFO } from '@lynx-js/template-webpack-plugin';
5
+ import { UI_SOURCE_MAP_RECORDS_BUILD_INFO } from '@lynx-js/debug-metadata';
6
6
  import { getMainThreadTransformOptions } from './options.js';
7
7
  export const ELEMENT_TEMPLATE_BUILD_INFO = 'lynx:element-templates';
8
8
  const mainThreadLoader = function (content, sourceMap) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-webpack-plugin-canary",
3
- "version": "0.9.3",
3
+ "version": "0.9.4-canary-20260528-d5162d28",
4
4
  "description": "A webpack plugin for ReactLynx",
5
5
  "keywords": [
6
6
  "webpack",
@@ -33,20 +33,21 @@
33
33
  "README.md"
34
34
  ],
35
35
  "dependencies": {
36
+ "@lynx-js/debug-metadata": "npm:@lynx-js/debug-metadata-canary@0.1.0-canary-20260528-d5162d28",
36
37
  "@lynx-js/webpack-runtime-globals": "npm:@lynx-js/webpack-runtime-globals-canary@0.0.6",
37
38
  "tiny-invariant": "^1.3.3"
38
39
  },
39
40
  "devDependencies": {
40
41
  "@microsoft/api-extractor": "7.58.2",
41
- "@rspack/core": "1.7.9",
42
+ "@rspack/core": "2.0.3",
42
43
  "css-loader": "^7.1.4",
43
44
  "swc-loader": "^0.2.7",
44
45
  "webpack": "^5.105.2",
45
- "@lynx-js/react": "npm:@lynx-js/react-canary@0.121.1",
46
- "@lynx-js/test-tools": "0.0.0",
46
+ "@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.7.2-canary-20260528-d5162d28",
47
47
  "@lynx-js/vitest-setup": "0.0.0",
48
- "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.11.2",
49
- "@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.7.1"
48
+ "@lynx-js/test-tools": "0.0.0",
49
+ "@lynx-js/react": "npm:@lynx-js/react-canary@0.121.2-canary-20260528-d5162d28",
50
+ "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.12.0-canary-20260528-d5162d28"
50
51
  },
51
52
  "peerDependencies": {
52
53
  "@lynx-js/template-webpack-plugin": "*"