@lynx-js/react-webpack-plugin-canary 0.9.4-canary-20260616-a2a95ea4 → 0.9.4
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 +21 -19
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lynx-js/react-webpack-plugin
|
|
2
2
|
|
|
3
|
-
## 0.9.4
|
|
3
|
+
## 0.9.4
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -10,9 +10,8 @@
|
|
|
10
10
|
|
|
11
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
12
|
|
|
13
|
-
- Updated dependencies [[`a839d59`](https://github.com/lynx-family/lynx-stack/commit/a839d59b7f477a86f2cd10215d0b754264e54425), [`d3201df`](https://github.com/lynx-family/lynx-stack/commit/d3201dfa57964bfe6c8c52a803aeeb0fca1f2d27), [`409594b`](https://github.com/lynx-family/lynx-stack/commit/409594b9c51bb0c13f01c7d3f16949b27ebfdced), [`353363e`](https://github.com/lynx-family/lynx-stack/commit/353363e52dca3b252b39b34a3a87ce840dd308f3)
|
|
14
|
-
- @lynx-js/debug-metadata@0.1.0
|
|
15
|
-
- @lynx-js/template-webpack-plugin@0.12.0-canary-20260616090443-a2a95ea422c591475f4994421272b034b750bdcb
|
|
13
|
+
- Updated dependencies [[`a839d59`](https://github.com/lynx-family/lynx-stack/commit/a839d59b7f477a86f2cd10215d0b754264e54425), [`d3201df`](https://github.com/lynx-family/lynx-stack/commit/d3201dfa57964bfe6c8c52a803aeeb0fca1f2d27), [`409594b`](https://github.com/lynx-family/lynx-stack/commit/409594b9c51bb0c13f01c7d3f16949b27ebfdced), [`353363e`](https://github.com/lynx-family/lynx-stack/commit/353363e52dca3b252b39b34a3a87ce840dd308f3)]:
|
|
14
|
+
- @lynx-js/debug-metadata@0.1.0
|
|
16
15
|
|
|
17
16
|
## 0.9.3
|
|
18
17
|
|
|
@@ -51,6 +50,7 @@
|
|
|
51
50
|
### Minor Changes
|
|
52
51
|
|
|
53
52
|
- feat: add `globalPropsMode` option to `PluginReactLynxOptions` ([#2346](https://github.com/lynx-family/lynx-stack/pull/2346))
|
|
53
|
+
|
|
54
54
|
- When configured to `"event"`, `updateGlobalProps` will only trigger a global event and skip the `runWithForce` flow.
|
|
55
55
|
- Defaults to `"reactive"`, which means `updateGlobalProps` will trigger re-render automatically.
|
|
56
56
|
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
- Fix sourcemap misalignment when wrapping lazy bundle main-thread chunks. ([#2361](https://github.com/lynx-family/lynx-stack/pull/2361))
|
|
60
60
|
|
|
61
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`.
|
|
62
|
+
|
|
62
63
|
- With `experimental_isLazyBundle: true`, the wrapper is applied to lazy-bundle chunk groups.
|
|
63
64
|
- Without lazy bundle mode, the wrapper is applied to async main-thread chunk groups generated by dynamic import.
|
|
64
65
|
|
|
@@ -138,16 +139,16 @@
|
|
|
138
139
|
type InlineChunkConfig =
|
|
139
140
|
| boolean
|
|
140
141
|
| InlineChunkTest
|
|
141
|
-
| { enable?: boolean |
|
|
142
|
+
| { enable?: boolean | 'auto'; test: InlineChunkTest };
|
|
142
143
|
```
|
|
143
144
|
|
|
144
145
|
```ts
|
|
145
|
-
import { defineConfig } from
|
|
146
|
+
import { defineConfig } from '@lynx-js/rspeedy';
|
|
146
147
|
|
|
147
148
|
export default defineConfig({
|
|
148
149
|
output: {
|
|
149
150
|
inlineScripts: ({ name, size }) => {
|
|
150
|
-
return name.includes(
|
|
151
|
+
return name.includes('foo') && size < 1000;
|
|
151
152
|
},
|
|
152
153
|
},
|
|
153
154
|
});
|
|
@@ -202,6 +203,7 @@
|
|
|
202
203
|
- feat: fully support MTS ([#569](https://github.com/lynx-family/lynx-stack/pull/569))
|
|
203
204
|
|
|
204
205
|
Now use support the following usage
|
|
206
|
+
|
|
205
207
|
- mainthread event
|
|
206
208
|
- mainthread ref
|
|
207
209
|
- runOnMainThread/runOnBackground
|
|
@@ -230,7 +232,7 @@
|
|
|
230
232
|
- Shake `useImperativeHandle` on the main-thread by default. ([#153](https://github.com/lynx-family/lynx-stack/pull/153))
|
|
231
233
|
|
|
232
234
|
```js
|
|
233
|
-
import { forwardRef, useImperativeHandle } from
|
|
235
|
+
import { forwardRef, useImperativeHandle } from '@lynx-js/react';
|
|
234
236
|
|
|
235
237
|
export default forwardRef(function App(_, ref) {
|
|
236
238
|
useImperativeHandle(ref, () => {
|
|
@@ -238,7 +240,7 @@
|
|
|
238
240
|
return {
|
|
239
241
|
name() {
|
|
240
242
|
// This should be considered as background only
|
|
241
|
-
console.info(
|
|
243
|
+
console.info('This should not exist in main-thread');
|
|
242
244
|
},
|
|
243
245
|
};
|
|
244
246
|
});
|
|
@@ -298,14 +300,14 @@
|
|
|
298
300
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
299
301
|
|
|
300
302
|
```js
|
|
301
|
-
import { pluginReactLynx } from
|
|
302
|
-
import { defineConfig } from
|
|
303
|
+
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin';
|
|
304
|
+
import { defineConfig } from '@lynx-js/rspeedy';
|
|
303
305
|
|
|
304
306
|
export default defineConfig({
|
|
305
307
|
plugins: [
|
|
306
308
|
pluginReactLynx({
|
|
307
309
|
defineDCE: {
|
|
308
|
-
__SOME_FALSE_DEFINE__:
|
|
310
|
+
__SOME_FALSE_DEFINE__: 'false',
|
|
309
311
|
},
|
|
310
312
|
}),
|
|
311
313
|
],
|
|
@@ -317,20 +319,20 @@
|
|
|
317
319
|
For example, `import` initialized by dead code will be removed:
|
|
318
320
|
|
|
319
321
|
```js
|
|
320
|
-
import { foo } from
|
|
322
|
+
import { foo } from 'bar';
|
|
321
323
|
|
|
322
324
|
if (__SOME_FALSE_DEFINE__) {
|
|
323
325
|
foo();
|
|
324
|
-
console.log(
|
|
326
|
+
console.log('dead code');
|
|
325
327
|
} else {
|
|
326
|
-
console.log(
|
|
328
|
+
console.log('reachable code');
|
|
327
329
|
}
|
|
328
330
|
```
|
|
329
331
|
|
|
330
332
|
will be transformed to:
|
|
331
333
|
|
|
332
334
|
```js
|
|
333
|
-
console.log(
|
|
335
|
+
console.log('reachable code');
|
|
334
336
|
```
|
|
335
337
|
|
|
336
338
|
## 0.6.0
|
|
@@ -340,14 +342,14 @@
|
|
|
340
342
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
341
343
|
|
|
342
344
|
```js
|
|
343
|
-
import { pluginReactLynx } from
|
|
344
|
-
import { defineConfig } from
|
|
345
|
+
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin';
|
|
346
|
+
import { defineConfig } from '@lynx-js/rspeedy';
|
|
345
347
|
|
|
346
348
|
export default defineConfig({
|
|
347
349
|
plugins: [
|
|
348
350
|
pluginReactLynx({
|
|
349
351
|
compat: {
|
|
350
|
-
removeComponentAttrRegex:
|
|
352
|
+
removeComponentAttrRegex: 'YOUR REGEX',
|
|
351
353
|
},
|
|
352
354
|
}),
|
|
353
355
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-webpack-plugin-canary",
|
|
3
|
-
"version": "0.9.4
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "A webpack plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"README.md"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@lynx-js/debug-metadata": "npm:@lynx-js/debug-metadata-canary@0.1.0
|
|
36
|
+
"@lynx-js/debug-metadata": "npm:@lynx-js/debug-metadata-canary@0.1.0",
|
|
37
37
|
"@lynx-js/webpack-runtime-globals": "npm:@lynx-js/webpack-runtime-globals-canary@0.0.6",
|
|
38
38
|
"tiny-invariant": "^1.3.3"
|
|
39
39
|
},
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@rstest/core": "0.10.5",
|
|
45
45
|
"css-loader": "^7.1.4",
|
|
46
46
|
"swc-loader": "^0.2.7",
|
|
47
|
-
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.8.0
|
|
48
|
-
"@lynx-js/react": "npm:@lynx-js/react-canary@0.121.2
|
|
49
|
-
"@lynx-js/
|
|
50
|
-
"@lynx-js/
|
|
47
|
+
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.8.0",
|
|
48
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.121.2",
|
|
49
|
+
"@lynx-js/test-tools": "0.0.0",
|
|
50
|
+
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.12.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@lynx-js/template-webpack-plugin": "*"
|