@lynx-js/react-webpack-plugin-canary 0.6.11-canary-20250418-4aba4b72 → 0.6.11
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 +13 -16
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lynx-js/react-webpack-plugin
|
|
2
2
|
|
|
3
|
-
## 0.6.11
|
|
3
|
+
## 0.6.11
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
- runOnMainThread/runOnBackground
|
|
14
14
|
- ref.current.xx
|
|
15
15
|
|
|
16
|
-
- Updated dependencies [[`67bcc47`](https://github.com/lynx-family/lynx-stack/commit/67bcc4731eed0b8a0f97ef54dea03e94c9fe4235), [`c0f06ba`](https://github.com/lynx-family/lynx-stack/commit/c0f06ba2398fcf1a0496c160db6b3d3c471a8937)]:
|
|
17
|
-
- @lynx-js/react@0.106.5-canary-20250418104231-4aba4b727dfeb95061619d1b113469cf3f0e102d
|
|
18
|
-
|
|
19
16
|
## 0.6.10
|
|
20
17
|
|
|
21
18
|
### Patch Changes
|
|
@@ -39,7 +36,7 @@
|
|
|
39
36
|
- Shake `useImperativeHandle` on the main-thread by default. ([#153](https://github.com/lynx-family/lynx-stack/pull/153))
|
|
40
37
|
|
|
41
38
|
```js
|
|
42
|
-
import { forwardRef, useImperativeHandle } from
|
|
39
|
+
import { forwardRef, useImperativeHandle } from '@lynx-js/react';
|
|
43
40
|
|
|
44
41
|
export default forwardRef(function App(_, ref) {
|
|
45
42
|
useImperativeHandle(ref, () => {
|
|
@@ -47,7 +44,7 @@
|
|
|
47
44
|
return {
|
|
48
45
|
name() {
|
|
49
46
|
// This should be considered as background only
|
|
50
|
-
console.info(
|
|
47
|
+
console.info('This should not exist in main-thread');
|
|
51
48
|
},
|
|
52
49
|
};
|
|
53
50
|
});
|
|
@@ -107,14 +104,14 @@
|
|
|
107
104
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
108
105
|
|
|
109
106
|
```js
|
|
110
|
-
import { pluginReactLynx } from
|
|
111
|
-
import { defineConfig } from
|
|
107
|
+
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin';
|
|
108
|
+
import { defineConfig } from '@lynx-js/rspeedy';
|
|
112
109
|
|
|
113
110
|
export default defineConfig({
|
|
114
111
|
plugins: [
|
|
115
112
|
pluginReactLynx({
|
|
116
113
|
defineDCE: {
|
|
117
|
-
__SOME_FALSE_DEFINE__:
|
|
114
|
+
__SOME_FALSE_DEFINE__: 'false',
|
|
118
115
|
},
|
|
119
116
|
}),
|
|
120
117
|
],
|
|
@@ -126,20 +123,20 @@
|
|
|
126
123
|
For example, `import` initialized by dead code will be removed:
|
|
127
124
|
|
|
128
125
|
```js
|
|
129
|
-
import { foo } from
|
|
126
|
+
import { foo } from 'bar';
|
|
130
127
|
|
|
131
128
|
if (__SOME_FALSE_DEFINE__) {
|
|
132
129
|
foo();
|
|
133
|
-
console.log(
|
|
130
|
+
console.log('dead code');
|
|
134
131
|
} else {
|
|
135
|
-
console.log(
|
|
132
|
+
console.log('reachable code');
|
|
136
133
|
}
|
|
137
134
|
```
|
|
138
135
|
|
|
139
136
|
will be transformed to:
|
|
140
137
|
|
|
141
138
|
```js
|
|
142
|
-
console.log(
|
|
139
|
+
console.log('reachable code');
|
|
143
140
|
```
|
|
144
141
|
|
|
145
142
|
## 0.6.0
|
|
@@ -149,14 +146,14 @@
|
|
|
149
146
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
150
147
|
|
|
151
148
|
```js
|
|
152
|
-
import { pluginReactLynx } from
|
|
153
|
-
import { defineConfig } from
|
|
149
|
+
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin';
|
|
150
|
+
import { defineConfig } from '@lynx-js/rspeedy';
|
|
154
151
|
|
|
155
152
|
export default defineConfig({
|
|
156
153
|
plugins: [
|
|
157
154
|
pluginReactLynx({
|
|
158
155
|
compat: {
|
|
159
|
-
removeComponentAttrRegex:
|
|
156
|
+
removeComponentAttrRegex: 'YOUR REGEX',
|
|
160
157
|
},
|
|
161
158
|
}),
|
|
162
159
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-webpack-plugin-canary",
|
|
3
|
-
"version": "0.6.11
|
|
3
|
+
"version": "0.6.11",
|
|
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.99.5",
|
|
45
|
-
"@lynx-js/react": "npm:@lynx-js/react-canary@0.106.5-canary-20250418-4aba4b72",
|
|
46
45
|
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.5.3",
|
|
47
46
|
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.6.9",
|
|
47
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.106.5",
|
|
48
48
|
"@lynx-js/vitest-setup": "0.0.0",
|
|
49
49
|
"@lynx-js/test-tools": "0.0.0"
|
|
50
50
|
},
|