@lynx-js/react-webpack-plugin-canary 0.10.2 → 0.10.3-canary-20260805-3b36a4eb
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 +28 -19
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @lynx-js/react-webpack-plugin
|
|
2
2
|
|
|
3
|
+
## 0.10.3-canary-20260805052727-3b36a4eb378b98f335c7212cb5258c6722efeed6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Allow the next minor of `@lynx-js/template-webpack-plugin` as a peer dependency. ([#3362](https://github.com/lynx-family/lynx-stack/pull/3362))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`43f74b0`](https://github.com/lynx-family/lynx-stack/commit/43f74b01e1d6af7798e79ddd03c0a972d49c3aea), [`3b36a4e`](https://github.com/lynx-family/lynx-stack/commit/3b36a4eb378b98f335c7212cb5258c6722efeed6)]:
|
|
10
|
+
- @lynx-js/template-webpack-plugin@0.15.0-canary-20260805052727-3b36a4eb378b98f335c7212cb5258c6722efeed6
|
|
11
|
+
|
|
3
12
|
## 0.10.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -33,12 +42,12 @@
|
|
|
33
42
|
|
|
34
43
|
```js
|
|
35
44
|
pluginReactLynx({
|
|
36
|
-
firstScreenSyncTiming:
|
|
45
|
+
firstScreenSyncTiming: "manual",
|
|
37
46
|
});
|
|
38
47
|
```
|
|
39
48
|
|
|
40
49
|
```js
|
|
41
|
-
import { markFirstScreenSyncReady } from
|
|
50
|
+
import { markFirstScreenSyncReady } from "@lynx-js/react";
|
|
42
51
|
|
|
43
52
|
markFirstScreenSyncReady();
|
|
44
53
|
```
|
|
@@ -48,8 +57,8 @@
|
|
|
48
57
|
- Add `compat.legacySlot` to `pluginReactLynx`. When enabled, dynamic children are compiled to the pre-SlotV2 form (JSX `children` + `wrapper` elements + `__DynamicPartChildren`/`__DynamicPartSlot` symbols instead of `$0`/`$1` slot props + `SlotV2`), so the compiled output stays compatible with legacy runtimes without `SlotV2` support (`< 0.120.0`, which shipped the SlotV2 refactor in #1764) — e.g. a standalone lazy bundle consumed by a host App that ships an older runtime. ([#2947](https://github.com/lynx-family/lynx-stack/pull/2947))
|
|
49
58
|
|
|
50
59
|
```js
|
|
51
|
-
import { defineConfig } from
|
|
52
|
-
import { pluginReactLynx } from
|
|
60
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
61
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
53
62
|
|
|
54
63
|
export default defineConfig({
|
|
55
64
|
plugins: [
|
|
@@ -222,16 +231,16 @@
|
|
|
222
231
|
type InlineChunkConfig =
|
|
223
232
|
| boolean
|
|
224
233
|
| InlineChunkTest
|
|
225
|
-
| { enable?: boolean |
|
|
234
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
226
235
|
```
|
|
227
236
|
|
|
228
237
|
```ts
|
|
229
|
-
import { defineConfig } from
|
|
238
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
230
239
|
|
|
231
240
|
export default defineConfig({
|
|
232
241
|
output: {
|
|
233
242
|
inlineScripts: ({ name, size }) => {
|
|
234
|
-
return name.includes(
|
|
243
|
+
return name.includes("foo") && size < 1000;
|
|
235
244
|
},
|
|
236
245
|
},
|
|
237
246
|
});
|
|
@@ -315,7 +324,7 @@
|
|
|
315
324
|
- Shake `useImperativeHandle` on the main-thread by default. ([#153](https://github.com/lynx-family/lynx-stack/pull/153))
|
|
316
325
|
|
|
317
326
|
```js
|
|
318
|
-
import { forwardRef, useImperativeHandle } from
|
|
327
|
+
import { forwardRef, useImperativeHandle } from "@lynx-js/react";
|
|
319
328
|
|
|
320
329
|
export default forwardRef(function App(_, ref) {
|
|
321
330
|
useImperativeHandle(ref, () => {
|
|
@@ -323,7 +332,7 @@
|
|
|
323
332
|
return {
|
|
324
333
|
name() {
|
|
325
334
|
// This should be considered as background only
|
|
326
|
-
console.info(
|
|
335
|
+
console.info("This should not exist in main-thread");
|
|
327
336
|
},
|
|
328
337
|
};
|
|
329
338
|
});
|
|
@@ -383,14 +392,14 @@
|
|
|
383
392
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
384
393
|
|
|
385
394
|
```js
|
|
386
|
-
import { pluginReactLynx } from
|
|
387
|
-
import { defineConfig } from
|
|
395
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
396
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
388
397
|
|
|
389
398
|
export default defineConfig({
|
|
390
399
|
plugins: [
|
|
391
400
|
pluginReactLynx({
|
|
392
401
|
defineDCE: {
|
|
393
|
-
__SOME_FALSE_DEFINE__:
|
|
402
|
+
__SOME_FALSE_DEFINE__: "false",
|
|
394
403
|
},
|
|
395
404
|
}),
|
|
396
405
|
],
|
|
@@ -402,20 +411,20 @@
|
|
|
402
411
|
For example, `import` initialized by dead code will be removed:
|
|
403
412
|
|
|
404
413
|
```js
|
|
405
|
-
import { foo } from
|
|
414
|
+
import { foo } from "bar";
|
|
406
415
|
|
|
407
416
|
if (__SOME_FALSE_DEFINE__) {
|
|
408
417
|
foo();
|
|
409
|
-
console.log(
|
|
418
|
+
console.log("dead code");
|
|
410
419
|
} else {
|
|
411
|
-
console.log(
|
|
420
|
+
console.log("reachable code");
|
|
412
421
|
}
|
|
413
422
|
```
|
|
414
423
|
|
|
415
424
|
will be transformed to:
|
|
416
425
|
|
|
417
426
|
```js
|
|
418
|
-
console.log(
|
|
427
|
+
console.log("reachable code");
|
|
419
428
|
```
|
|
420
429
|
|
|
421
430
|
## 0.6.0
|
|
@@ -425,14 +434,14 @@
|
|
|
425
434
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
426
435
|
|
|
427
436
|
```js
|
|
428
|
-
import { pluginReactLynx } from
|
|
429
|
-
import { defineConfig } from
|
|
437
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
438
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
430
439
|
|
|
431
440
|
export default defineConfig({
|
|
432
441
|
plugins: [
|
|
433
442
|
pluginReactLynx({
|
|
434
443
|
compat: {
|
|
435
|
-
removeComponentAttrRegex:
|
|
444
|
+
removeComponentAttrRegex: "YOUR REGEX",
|
|
436
445
|
},
|
|
437
446
|
}),
|
|
438
447
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-webpack-plugin-canary",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3-canary-20260805-3b36a4eb",
|
|
4
4
|
"description": "A webpack plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@rstest/core": "0.11.3",
|
|
45
45
|
"css-loader": "^7.1.4",
|
|
46
46
|
"swc-loader": "^0.2.7",
|
|
47
|
-
"@lynx-js/
|
|
48
|
-
"@lynx-js/
|
|
47
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.123.3-canary-20260805-3b36a4eb",
|
|
48
|
+
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.10.1-canary-20260805-3b36a4eb",
|
|
49
49
|
"@lynx-js/test-tools": "0.0.0",
|
|
50
|
-
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.
|
|
50
|
+
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.15.0-canary-20260805-3b36a4eb"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@lynx-js/template-webpack-plugin": "*"
|