@lynx-js/react-webpack-plugin-canary 0.7.2 → 0.7.3-canary-20251209-553ece1e
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 +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @lynx-js/react-webpack-plugin
|
|
2
2
|
|
|
3
|
+
## 0.7.3-canary-20251209032025-553ece1e025b1f4feae353310c21b2e159f1f03a
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Support `@lynx-js/template-webpack-plugin` v0.10.0. ([#1992](https://github.com/lynx-family/lynx-stack/pull/1992))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`8cdb69d`](https://github.com/lynx-family/lynx-stack/commit/8cdb69d4b2cc3e9925a2494ee8a889d7af17e2e9)]:
|
|
10
|
+
- @lynx-js/template-webpack-plugin@0.10.0-canary-20251209032025-553ece1e025b1f4feae353310c21b2e159f1f03a
|
|
11
|
+
|
|
3
12
|
## 0.7.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -60,16 +69,16 @@
|
|
|
60
69
|
type InlineChunkConfig =
|
|
61
70
|
| boolean
|
|
62
71
|
| InlineChunkTest
|
|
63
|
-
| { enable?: boolean |
|
|
72
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
64
73
|
```
|
|
65
74
|
|
|
66
75
|
```ts
|
|
67
|
-
import { defineConfig } from
|
|
76
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
68
77
|
|
|
69
78
|
export default defineConfig({
|
|
70
79
|
output: {
|
|
71
80
|
inlineScripts: ({ name, size }) => {
|
|
72
|
-
return name.includes(
|
|
81
|
+
return name.includes("foo") && size < 1000;
|
|
73
82
|
},
|
|
74
83
|
},
|
|
75
84
|
});
|
|
@@ -153,7 +162,7 @@
|
|
|
153
162
|
- Shake `useImperativeHandle` on the main-thread by default. ([#153](https://github.com/lynx-family/lynx-stack/pull/153))
|
|
154
163
|
|
|
155
164
|
```js
|
|
156
|
-
import { forwardRef, useImperativeHandle } from
|
|
165
|
+
import { forwardRef, useImperativeHandle } from "@lynx-js/react";
|
|
157
166
|
|
|
158
167
|
export default forwardRef(function App(_, ref) {
|
|
159
168
|
useImperativeHandle(ref, () => {
|
|
@@ -161,7 +170,7 @@
|
|
|
161
170
|
return {
|
|
162
171
|
name() {
|
|
163
172
|
// This should be considered as background only
|
|
164
|
-
console.info(
|
|
173
|
+
console.info("This should not exist in main-thread");
|
|
165
174
|
},
|
|
166
175
|
};
|
|
167
176
|
});
|
|
@@ -221,14 +230,14 @@
|
|
|
221
230
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
222
231
|
|
|
223
232
|
```js
|
|
224
|
-
import { pluginReactLynx } from
|
|
225
|
-
import { defineConfig } from
|
|
233
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
234
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
226
235
|
|
|
227
236
|
export default defineConfig({
|
|
228
237
|
plugins: [
|
|
229
238
|
pluginReactLynx({
|
|
230
239
|
defineDCE: {
|
|
231
|
-
__SOME_FALSE_DEFINE__:
|
|
240
|
+
__SOME_FALSE_DEFINE__: "false",
|
|
232
241
|
},
|
|
233
242
|
}),
|
|
234
243
|
],
|
|
@@ -240,20 +249,20 @@
|
|
|
240
249
|
For example, `import` initialized by dead code will be removed:
|
|
241
250
|
|
|
242
251
|
```js
|
|
243
|
-
import { foo } from
|
|
252
|
+
import { foo } from "bar";
|
|
244
253
|
|
|
245
254
|
if (__SOME_FALSE_DEFINE__) {
|
|
246
255
|
foo();
|
|
247
|
-
console.log(
|
|
256
|
+
console.log("dead code");
|
|
248
257
|
} else {
|
|
249
|
-
console.log(
|
|
258
|
+
console.log("reachable code");
|
|
250
259
|
}
|
|
251
260
|
```
|
|
252
261
|
|
|
253
262
|
will be transformed to:
|
|
254
263
|
|
|
255
264
|
```js
|
|
256
|
-
console.log(
|
|
265
|
+
console.log("reachable code");
|
|
257
266
|
```
|
|
258
267
|
|
|
259
268
|
## 0.6.0
|
|
@@ -263,14 +272,14 @@
|
|
|
263
272
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
264
273
|
|
|
265
274
|
```js
|
|
266
|
-
import { pluginReactLynx } from
|
|
267
|
-
import { defineConfig } from
|
|
275
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
276
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
268
277
|
|
|
269
278
|
export default defineConfig({
|
|
270
279
|
plugins: [
|
|
271
280
|
pluginReactLynx({
|
|
272
281
|
compat: {
|
|
273
|
-
removeComponentAttrRegex:
|
|
282
|
+
removeComponentAttrRegex: "YOUR REGEX",
|
|
274
283
|
},
|
|
275
284
|
}),
|
|
276
285
|
],
|
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.3-canary-20251209-553ece1e",
|
|
4
4
|
"description": "A webpack plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@microsoft/api-extractor": "7.52.15",
|
|
41
|
-
"@rspack/core": "1.6.
|
|
41
|
+
"@rspack/core": "1.6.5",
|
|
42
42
|
"css-loader": "^7.1.2",
|
|
43
43
|
"swc-loader": "^0.2.6",
|
|
44
44
|
"webpack": "^5.102.0",
|
|
45
|
-
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.
|
|
46
|
-
"@lynx-js/
|
|
47
|
-
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.9.1",
|
|
45
|
+
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.7.0-canary-20251209-553ece1e",
|
|
46
|
+
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.10.0-canary-20251209-553ece1e",
|
|
48
47
|
"@lynx-js/vitest-setup": "0.0.0",
|
|
48
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.115.1-canary-20251209-553ece1e",
|
|
49
49
|
"@lynx-js/test-tools": "0.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|