@lynx-js/react-webpack-plugin-canary 0.6.17 → 0.6.18-canary-20250701-99a35571
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 +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @lynx-js/react-webpack-plugin
|
|
2
2
|
|
|
3
|
+
## 0.6.18-canary-20250701131327-99a355719ad3106d20118dc1ea3abf34ddbdb9ad
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Be compat with `@lynx-js/react` v0.111.0 ([#204](https://github.com/lynx-family/lynx-stack/pull/204))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`99a3557`](https://github.com/lynx-family/lynx-stack/commit/99a355719ad3106d20118dc1ea3abf34ddbdb9ad)]:
|
|
10
|
+
- @lynx-js/react@0.111.0-canary-20250701131327-99a355719ad3106d20118dc1ea3abf34ddbdb9ad
|
|
11
|
+
|
|
3
12
|
## 0.6.17
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -17,16 +26,16 @@
|
|
|
17
26
|
type InlineChunkConfig =
|
|
18
27
|
| boolean
|
|
19
28
|
| InlineChunkTest
|
|
20
|
-
| { enable?: boolean |
|
|
29
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
21
30
|
```
|
|
22
31
|
|
|
23
32
|
```ts
|
|
24
|
-
import { defineConfig } from
|
|
33
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
25
34
|
|
|
26
35
|
export default defineConfig({
|
|
27
36
|
output: {
|
|
28
37
|
inlineScripts: ({ name, size }) => {
|
|
29
|
-
return name.includes(
|
|
38
|
+
return name.includes("foo") && size < 1000;
|
|
30
39
|
},
|
|
31
40
|
},
|
|
32
41
|
});
|
|
@@ -110,7 +119,7 @@
|
|
|
110
119
|
- Shake `useImperativeHandle` on the main-thread by default. ([#153](https://github.com/lynx-family/lynx-stack/pull/153))
|
|
111
120
|
|
|
112
121
|
```js
|
|
113
|
-
import { forwardRef, useImperativeHandle } from
|
|
122
|
+
import { forwardRef, useImperativeHandle } from "@lynx-js/react";
|
|
114
123
|
|
|
115
124
|
export default forwardRef(function App(_, ref) {
|
|
116
125
|
useImperativeHandle(ref, () => {
|
|
@@ -118,7 +127,7 @@
|
|
|
118
127
|
return {
|
|
119
128
|
name() {
|
|
120
129
|
// This should be considered as background only
|
|
121
|
-
console.info(
|
|
130
|
+
console.info("This should not exist in main-thread");
|
|
122
131
|
},
|
|
123
132
|
};
|
|
124
133
|
});
|
|
@@ -178,14 +187,14 @@
|
|
|
178
187
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
179
188
|
|
|
180
189
|
```js
|
|
181
|
-
import { pluginReactLynx } from
|
|
182
|
-
import { defineConfig } from
|
|
190
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
191
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
183
192
|
|
|
184
193
|
export default defineConfig({
|
|
185
194
|
plugins: [
|
|
186
195
|
pluginReactLynx({
|
|
187
196
|
defineDCE: {
|
|
188
|
-
__SOME_FALSE_DEFINE__:
|
|
197
|
+
__SOME_FALSE_DEFINE__: "false",
|
|
189
198
|
},
|
|
190
199
|
}),
|
|
191
200
|
],
|
|
@@ -197,20 +206,20 @@
|
|
|
197
206
|
For example, `import` initialized by dead code will be removed:
|
|
198
207
|
|
|
199
208
|
```js
|
|
200
|
-
import { foo } from
|
|
209
|
+
import { foo } from "bar";
|
|
201
210
|
|
|
202
211
|
if (__SOME_FALSE_DEFINE__) {
|
|
203
212
|
foo();
|
|
204
|
-
console.log(
|
|
213
|
+
console.log("dead code");
|
|
205
214
|
} else {
|
|
206
|
-
console.log(
|
|
215
|
+
console.log("reachable code");
|
|
207
216
|
}
|
|
208
217
|
```
|
|
209
218
|
|
|
210
219
|
will be transformed to:
|
|
211
220
|
|
|
212
221
|
```js
|
|
213
|
-
console.log(
|
|
222
|
+
console.log("reachable code");
|
|
214
223
|
```
|
|
215
224
|
|
|
216
225
|
## 0.6.0
|
|
@@ -220,14 +229,14 @@
|
|
|
220
229
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
221
230
|
|
|
222
231
|
```js
|
|
223
|
-
import { pluginReactLynx } from
|
|
224
|
-
import { defineConfig } from
|
|
232
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
233
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
225
234
|
|
|
226
235
|
export default defineConfig({
|
|
227
236
|
plugins: [
|
|
228
237
|
pluginReactLynx({
|
|
229
238
|
compat: {
|
|
230
|
-
removeComponentAttrRegex:
|
|
239
|
+
removeComponentAttrRegex: "YOUR REGEX",
|
|
231
240
|
},
|
|
232
241
|
}),
|
|
233
242
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-webpack-plugin-canary",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.18-canary-20250701-99a35571",
|
|
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.8",
|
|
41
|
-
"@rspack/core": "1.4.
|
|
41
|
+
"@rspack/core": "1.4.1",
|
|
42
42
|
"css-loader": "^7.1.2",
|
|
43
43
|
"swc-loader": "^0.2.6",
|
|
44
44
|
"webpack": "^5.99.9",
|
|
45
45
|
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.6.0",
|
|
46
46
|
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.8.1",
|
|
47
47
|
"@lynx-js/test-tools": "0.0.0",
|
|
48
|
-
"@lynx-js/react": "npm:@lynx-js/react-canary@0.
|
|
48
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.111.0-canary-20250701-99a35571",
|
|
49
49
|
"@lynx-js/vitest-setup": "0.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|