@lynx-js/react-webpack-plugin-canary 0.9.2-canary-20260424-7e5f54ca → 0.9.2
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 +19 -19
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
# @lynx-js/react-webpack-plugin
|
|
2
2
|
|
|
3
|
-
## 0.9.2
|
|
3
|
+
## 0.9.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- Support `@lynx-js/template-webpack-plugin` v0.11.0. ([#2483](https://github.com/lynx-family/lynx-stack/pull/2483))
|
|
8
8
|
|
|
9
|
-
- Updated dependencies [[`e179680`](https://github.com/lynx-family/lynx-stack/commit/e1796803444ba70efa86609b620c3a753b6694de), [`f15494b`](https://github.com/lynx-family/lynx-stack/commit/f15494b3b1231c11facd61bf1e07a43b6df5e07c)]:
|
|
10
|
-
- @lynx-js/template-webpack-plugin@0.11.0-canary-20260424103825-7e5f54ca13be07404b035c05e51b7ea661fba926
|
|
11
|
-
|
|
12
9
|
## 0.9.1
|
|
13
10
|
|
|
14
11
|
### Patch Changes
|
|
@@ -34,6 +31,7 @@
|
|
|
34
31
|
### Minor Changes
|
|
35
32
|
|
|
36
33
|
- feat: add `globalPropsMode` option to `PluginReactLynxOptions` ([#2346](https://github.com/lynx-family/lynx-stack/pull/2346))
|
|
34
|
+
|
|
37
35
|
- When configured to `"event"`, `updateGlobalProps` will only trigger a global event and skip the `runWithForce` flow.
|
|
38
36
|
- Defaults to `"reactive"`, which means `updateGlobalProps` will trigger re-render automatically.
|
|
39
37
|
|
|
@@ -42,6 +40,7 @@
|
|
|
42
40
|
- Fix sourcemap misalignment when wrapping lazy bundle main-thread chunks. ([#2361](https://github.com/lynx-family/lynx-stack/pull/2361))
|
|
43
41
|
|
|
44
42
|
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`.
|
|
43
|
+
|
|
45
44
|
- With `experimental_isLazyBundle: true`, the wrapper is applied to lazy-bundle chunk groups.
|
|
46
45
|
- Without lazy bundle mode, the wrapper is applied to async main-thread chunk groups generated by dynamic import.
|
|
47
46
|
|
|
@@ -121,16 +120,16 @@
|
|
|
121
120
|
type InlineChunkConfig =
|
|
122
121
|
| boolean
|
|
123
122
|
| InlineChunkTest
|
|
124
|
-
| { enable?: boolean |
|
|
123
|
+
| { enable?: boolean | 'auto'; test: InlineChunkTest };
|
|
125
124
|
```
|
|
126
125
|
|
|
127
126
|
```ts
|
|
128
|
-
import { defineConfig } from
|
|
127
|
+
import { defineConfig } from '@lynx-js/rspeedy';
|
|
129
128
|
|
|
130
129
|
export default defineConfig({
|
|
131
130
|
output: {
|
|
132
131
|
inlineScripts: ({ name, size }) => {
|
|
133
|
-
return name.includes(
|
|
132
|
+
return name.includes('foo') && size < 1000;
|
|
134
133
|
},
|
|
135
134
|
},
|
|
136
135
|
});
|
|
@@ -185,6 +184,7 @@
|
|
|
185
184
|
- feat: fully support MTS ([#569](https://github.com/lynx-family/lynx-stack/pull/569))
|
|
186
185
|
|
|
187
186
|
Now use support the following usage
|
|
187
|
+
|
|
188
188
|
- mainthread event
|
|
189
189
|
- mainthread ref
|
|
190
190
|
- runOnMainThread/runOnBackground
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
- Shake `useImperativeHandle` on the main-thread by default. ([#153](https://github.com/lynx-family/lynx-stack/pull/153))
|
|
214
214
|
|
|
215
215
|
```js
|
|
216
|
-
import { forwardRef, useImperativeHandle } from
|
|
216
|
+
import { forwardRef, useImperativeHandle } from '@lynx-js/react';
|
|
217
217
|
|
|
218
218
|
export default forwardRef(function App(_, ref) {
|
|
219
219
|
useImperativeHandle(ref, () => {
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
return {
|
|
222
222
|
name() {
|
|
223
223
|
// This should be considered as background only
|
|
224
|
-
console.info(
|
|
224
|
+
console.info('This should not exist in main-thread');
|
|
225
225
|
},
|
|
226
226
|
};
|
|
227
227
|
});
|
|
@@ -281,14 +281,14 @@
|
|
|
281
281
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
282
282
|
|
|
283
283
|
```js
|
|
284
|
-
import { pluginReactLynx } from
|
|
285
|
-
import { defineConfig } from
|
|
284
|
+
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin';
|
|
285
|
+
import { defineConfig } from '@lynx-js/rspeedy';
|
|
286
286
|
|
|
287
287
|
export default defineConfig({
|
|
288
288
|
plugins: [
|
|
289
289
|
pluginReactLynx({
|
|
290
290
|
defineDCE: {
|
|
291
|
-
__SOME_FALSE_DEFINE__:
|
|
291
|
+
__SOME_FALSE_DEFINE__: 'false',
|
|
292
292
|
},
|
|
293
293
|
}),
|
|
294
294
|
],
|
|
@@ -300,20 +300,20 @@
|
|
|
300
300
|
For example, `import` initialized by dead code will be removed:
|
|
301
301
|
|
|
302
302
|
```js
|
|
303
|
-
import { foo } from
|
|
303
|
+
import { foo } from 'bar';
|
|
304
304
|
|
|
305
305
|
if (__SOME_FALSE_DEFINE__) {
|
|
306
306
|
foo();
|
|
307
|
-
console.log(
|
|
307
|
+
console.log('dead code');
|
|
308
308
|
} else {
|
|
309
|
-
console.log(
|
|
309
|
+
console.log('reachable code');
|
|
310
310
|
}
|
|
311
311
|
```
|
|
312
312
|
|
|
313
313
|
will be transformed to:
|
|
314
314
|
|
|
315
315
|
```js
|
|
316
|
-
console.log(
|
|
316
|
+
console.log('reachable code');
|
|
317
317
|
```
|
|
318
318
|
|
|
319
319
|
## 0.6.0
|
|
@@ -323,14 +323,14 @@
|
|
|
323
323
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
324
324
|
|
|
325
325
|
```js
|
|
326
|
-
import { pluginReactLynx } from
|
|
327
|
-
import { defineConfig } from
|
|
326
|
+
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin';
|
|
327
|
+
import { defineConfig } from '@lynx-js/rspeedy';
|
|
328
328
|
|
|
329
329
|
export default defineConfig({
|
|
330
330
|
plugins: [
|
|
331
331
|
pluginReactLynx({
|
|
332
332
|
compat: {
|
|
333
|
-
removeComponentAttrRegex:
|
|
333
|
+
removeComponentAttrRegex: 'YOUR REGEX',
|
|
334
334
|
},
|
|
335
335
|
}),
|
|
336
336
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-webpack-plugin-canary",
|
|
3
|
-
"version": "0.9.2
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "A webpack plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"css-loader": "^7.1.4",
|
|
43
43
|
"swc-loader": "^0.2.7",
|
|
44
44
|
"webpack": "^5.105.2",
|
|
45
|
-
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.7.1
|
|
46
|
-
"@lynx-js/
|
|
47
|
-
"@lynx-js/
|
|
45
|
+
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.7.1",
|
|
46
|
+
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.11.0",
|
|
47
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.120.0",
|
|
48
48
|
"@lynx-js/test-tools": "0.0.0",
|
|
49
49
|
"@lynx-js/vitest-setup": "0.0.0"
|
|
50
50
|
},
|