@lynx-js/react-webpack-plugin-canary 0.7.0 → 0.7.1-canary-20250918-b17b7cb2
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 +24 -15
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @lynx-js/react-webpack-plugin
|
|
2
2
|
|
|
3
|
+
## 0.7.1-canary-20250918080343-b17b7cb2bb92d1539e76276f136806eefa788258
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Supports `@lynx-js/template-webpack-plugin` 0.9.0. ([#1705](https://github.com/lynx-family/lynx-stack/pull/1705))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`24100ab`](https://github.com/lynx-family/lynx-stack/commit/24100ab63302f8f2bc10578c70ac5cceeffe312a)]:
|
|
10
|
+
- @lynx-js/template-webpack-plugin@0.9.0-canary-20250918080343-b17b7cb2bb92d1539e76276f136806eefa788258
|
|
11
|
+
|
|
3
12
|
## 0.7.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -46,16 +55,16 @@
|
|
|
46
55
|
type InlineChunkConfig =
|
|
47
56
|
| boolean
|
|
48
57
|
| InlineChunkTest
|
|
49
|
-
| { enable?: boolean |
|
|
58
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
50
59
|
```
|
|
51
60
|
|
|
52
61
|
```ts
|
|
53
|
-
import { defineConfig } from
|
|
62
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
54
63
|
|
|
55
64
|
export default defineConfig({
|
|
56
65
|
output: {
|
|
57
66
|
inlineScripts: ({ name, size }) => {
|
|
58
|
-
return name.includes(
|
|
67
|
+
return name.includes("foo") && size < 1000;
|
|
59
68
|
},
|
|
60
69
|
},
|
|
61
70
|
});
|
|
@@ -139,7 +148,7 @@
|
|
|
139
148
|
- Shake `useImperativeHandle` on the main-thread by default. ([#153](https://github.com/lynx-family/lynx-stack/pull/153))
|
|
140
149
|
|
|
141
150
|
```js
|
|
142
|
-
import { forwardRef, useImperativeHandle } from
|
|
151
|
+
import { forwardRef, useImperativeHandle } from "@lynx-js/react";
|
|
143
152
|
|
|
144
153
|
export default forwardRef(function App(_, ref) {
|
|
145
154
|
useImperativeHandle(ref, () => {
|
|
@@ -147,7 +156,7 @@
|
|
|
147
156
|
return {
|
|
148
157
|
name() {
|
|
149
158
|
// This should be considered as background only
|
|
150
|
-
console.info(
|
|
159
|
+
console.info("This should not exist in main-thread");
|
|
151
160
|
},
|
|
152
161
|
};
|
|
153
162
|
});
|
|
@@ -207,14 +216,14 @@
|
|
|
207
216
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
208
217
|
|
|
209
218
|
```js
|
|
210
|
-
import { pluginReactLynx } from
|
|
211
|
-
import { defineConfig } from
|
|
219
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
220
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
212
221
|
|
|
213
222
|
export default defineConfig({
|
|
214
223
|
plugins: [
|
|
215
224
|
pluginReactLynx({
|
|
216
225
|
defineDCE: {
|
|
217
|
-
__SOME_FALSE_DEFINE__:
|
|
226
|
+
__SOME_FALSE_DEFINE__: "false",
|
|
218
227
|
},
|
|
219
228
|
}),
|
|
220
229
|
],
|
|
@@ -226,20 +235,20 @@
|
|
|
226
235
|
For example, `import` initialized by dead code will be removed:
|
|
227
236
|
|
|
228
237
|
```js
|
|
229
|
-
import { foo } from
|
|
238
|
+
import { foo } from "bar";
|
|
230
239
|
|
|
231
240
|
if (__SOME_FALSE_DEFINE__) {
|
|
232
241
|
foo();
|
|
233
|
-
console.log(
|
|
242
|
+
console.log("dead code");
|
|
234
243
|
} else {
|
|
235
|
-
console.log(
|
|
244
|
+
console.log("reachable code");
|
|
236
245
|
}
|
|
237
246
|
```
|
|
238
247
|
|
|
239
248
|
will be transformed to:
|
|
240
249
|
|
|
241
250
|
```js
|
|
242
|
-
console.log(
|
|
251
|
+
console.log("reachable code");
|
|
243
252
|
```
|
|
244
253
|
|
|
245
254
|
## 0.6.0
|
|
@@ -249,14 +258,14 @@
|
|
|
249
258
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
250
259
|
|
|
251
260
|
```js
|
|
252
|
-
import { pluginReactLynx } from
|
|
253
|
-
import { defineConfig } from
|
|
261
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
262
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
254
263
|
|
|
255
264
|
export default defineConfig({
|
|
256
265
|
plugins: [
|
|
257
266
|
pluginReactLynx({
|
|
258
267
|
compat: {
|
|
259
|
-
removeComponentAttrRegex:
|
|
268
|
+
removeComponentAttrRegex: "YOUR REGEX",
|
|
260
269
|
},
|
|
261
270
|
}),
|
|
262
271
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-webpack-plugin-canary",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1-canary-20250918-b17b7cb2",
|
|
4
4
|
"description": "A webpack plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"css-loader": "^7.1.2",
|
|
43
43
|
"swc-loader": "^0.2.6",
|
|
44
44
|
"webpack": "^5.101.3",
|
|
45
|
-
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.6.
|
|
46
|
-
"@lynx-js/
|
|
47
|
-
"@lynx-js/
|
|
45
|
+
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.6.3-canary-20250918-b17b7cb2",
|
|
46
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.114.0-canary-20250918-b17b7cb2",
|
|
47
|
+
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.9.0-canary-20250918-b17b7cb2",
|
|
48
48
|
"@lynx-js/test-tools": "0.0.0",
|
|
49
49
|
"@lynx-js/vitest-setup": "0.0.0"
|
|
50
50
|
},
|