@lynx-js/react-webpack-plugin-canary 0.6.8 → 0.6.9-canary-20250320-e996bc6c
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 +22 -12
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @lynx-js/react-webpack-plugin
|
|
2
2
|
|
|
3
|
+
## 0.6.9-canary-20250320034326-e996bc6c85889e7064cbb04430c2efc6ad695a51
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Support `@lynx-js/react` v0.106.0. ([#239](https://github.com/lynx-family/lynx-stack/pull/239))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`ba26a4d`](https://github.com/lynx-family/lynx-stack/commit/ba26a4db1ec3dcfd445dd834533b3bc10b091686), [`7391bc8`](https://github.com/lynx-family/lynx-stack/commit/7391bc85029ab831a839e4f4fd554a889ceb1ed8), [`462e97b`](https://github.com/lynx-family/lynx-stack/commit/462e97b28c12b554c0c825c7df453bdf433749ae)]:
|
|
10
|
+
- @lynx-js/template-webpack-plugin@0.6.6-canary-20250320034326-e996bc6c85889e7064cbb04430c2efc6ad695a51
|
|
11
|
+
- @lynx-js/react@0.106.0-canary-20250320034326-e996bc6c85889e7064cbb04430c2efc6ad695a51
|
|
12
|
+
|
|
3
13
|
## 0.6.8
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -7,7 +17,7 @@
|
|
|
7
17
|
- Shake `useImperativeHandle` on the main-thread by default. ([#153](https://github.com/lynx-family/lynx-stack/pull/153))
|
|
8
18
|
|
|
9
19
|
```js
|
|
10
|
-
import { forwardRef, useImperativeHandle } from
|
|
20
|
+
import { forwardRef, useImperativeHandle } from "@lynx-js/react";
|
|
11
21
|
|
|
12
22
|
export default forwardRef(function App(_, ref) {
|
|
13
23
|
useImperativeHandle(ref, () => {
|
|
@@ -15,7 +25,7 @@
|
|
|
15
25
|
return {
|
|
16
26
|
name() {
|
|
17
27
|
// This should be considered as background only
|
|
18
|
-
console.info(
|
|
28
|
+
console.info("This should not exist in main-thread");
|
|
19
29
|
},
|
|
20
30
|
};
|
|
21
31
|
});
|
|
@@ -75,14 +85,14 @@
|
|
|
75
85
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
76
86
|
|
|
77
87
|
```js
|
|
78
|
-
import { pluginReactLynx } from
|
|
79
|
-
import { defineConfig } from
|
|
88
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
89
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
80
90
|
|
|
81
91
|
export default defineConfig({
|
|
82
92
|
plugins: [
|
|
83
93
|
pluginReactLynx({
|
|
84
94
|
defineDCE: {
|
|
85
|
-
__SOME_FALSE_DEFINE__:
|
|
95
|
+
__SOME_FALSE_DEFINE__: "false",
|
|
86
96
|
},
|
|
87
97
|
}),
|
|
88
98
|
],
|
|
@@ -94,20 +104,20 @@
|
|
|
94
104
|
For example, `import` initialized by dead code will be removed:
|
|
95
105
|
|
|
96
106
|
```js
|
|
97
|
-
import { foo } from
|
|
107
|
+
import { foo } from "bar";
|
|
98
108
|
|
|
99
109
|
if (__SOME_FALSE_DEFINE__) {
|
|
100
110
|
foo();
|
|
101
|
-
console.log(
|
|
111
|
+
console.log("dead code");
|
|
102
112
|
} else {
|
|
103
|
-
console.log(
|
|
113
|
+
console.log("reachable code");
|
|
104
114
|
}
|
|
105
115
|
```
|
|
106
116
|
|
|
107
117
|
will be transformed to:
|
|
108
118
|
|
|
109
119
|
```js
|
|
110
|
-
console.log(
|
|
120
|
+
console.log("reachable code");
|
|
111
121
|
```
|
|
112
122
|
|
|
113
123
|
## 0.6.0
|
|
@@ -117,14 +127,14 @@
|
|
|
117
127
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
118
128
|
|
|
119
129
|
```js
|
|
120
|
-
import { pluginReactLynx } from
|
|
121
|
-
import { defineConfig } from
|
|
130
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
131
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
122
132
|
|
|
123
133
|
export default defineConfig({
|
|
124
134
|
plugins: [
|
|
125
135
|
pluginReactLynx({
|
|
126
136
|
compat: {
|
|
127
|
-
removeComponentAttrRegex:
|
|
137
|
+
removeComponentAttrRegex: "YOUR REGEX",
|
|
128
138
|
},
|
|
129
139
|
}),
|
|
130
140
|
],
|
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.9-canary-20250320-e996bc6c",
|
|
4
4
|
"description": "A webpack plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@microsoft/api-extractor": "7.51.1",
|
|
41
|
-
"@rspack/core": "1.
|
|
41
|
+
"@rspack/core": "1.3.0-beta.0",
|
|
42
42
|
"css-loader": "^7.1.2",
|
|
43
43
|
"swc-loader": "^0.2.6",
|
|
44
44
|
"webpack": "^5.98.0",
|
|
45
45
|
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.5.2",
|
|
46
|
-
"@lynx-js/
|
|
47
|
-
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.6.5",
|
|
46
|
+
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.6.6-canary-20250320-e996bc6c",
|
|
48
47
|
"@lynx-js/test-tools": "0.0.0",
|
|
49
|
-
"@lynx-js/vitest-setup": "0.0.0"
|
|
48
|
+
"@lynx-js/vitest-setup": "0.0.0",
|
|
49
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.106.0-canary-20250320-e996bc6c"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@lynx-js/react": "*",
|