@lynx-js/react-webpack-plugin 0.8.0 → 0.9.0
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 +8 -0
- package/lib/loaders/options.js +5 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @lynx-js/react-webpack-plugin
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add `removeCall` for shake function calls. Its initial default value matches the hooks that were previously in `removeCallParams`, and `removeCallParams` now defaults to empty. ([#2423](https://github.com/lynx-family/lynx-stack/pull/2423))
|
|
8
|
+
|
|
9
|
+
`removeCall` removes matched runtime hook calls entirely, replacing them with `undefined` in expression positions and dropping them in statement positions. `removeCallParams` keeps the existing behavior of preserving the call while stripping its arguments.
|
|
10
|
+
|
|
3
11
|
## 0.8.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/lib/loaders/options.js
CHANGED
|
@@ -135,6 +135,8 @@ export function getMainThreadTransformOptions(inputSourceMap) {
|
|
|
135
135
|
// so never pass true to shake to rust
|
|
136
136
|
pkgName: [
|
|
137
137
|
'react',
|
|
138
|
+
'preact/hooks',
|
|
139
|
+
'preact/compat',
|
|
138
140
|
PUBLIC_RUNTIME_PKG,
|
|
139
141
|
`${PUBLIC_RUNTIME_PKG}/legacy-react-runtime`,
|
|
140
142
|
RUNTIME_PKG,
|
|
@@ -154,14 +156,15 @@ export function getMainThreadTransformOptions(inputSourceMap) {
|
|
|
154
156
|
'defaultProps',
|
|
155
157
|
...(shake?.retainProp ?? []),
|
|
156
158
|
],
|
|
157
|
-
|
|
159
|
+
removeCall: [
|
|
158
160
|
'useEffect',
|
|
159
161
|
'useLayoutEffect',
|
|
160
162
|
'__runInJS',
|
|
161
163
|
'useLynxGlobalEventListener',
|
|
162
164
|
'useImperativeHandle',
|
|
163
|
-
...(shake?.
|
|
165
|
+
...(shake?.removeCall ?? []),
|
|
164
166
|
],
|
|
167
|
+
removeCallParams: shake?.removeCallParams ?? [],
|
|
165
168
|
},
|
|
166
169
|
worklet: {
|
|
167
170
|
...commonOptions.worklet,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-webpack-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "A webpack plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"@lynx-js/webpack-runtime-globals": "0.0.6"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@microsoft/api-extractor": "7.
|
|
41
|
-
"@rspack/core": "1.7.
|
|
40
|
+
"@microsoft/api-extractor": "7.58.2",
|
|
41
|
+
"@rspack/core": "1.7.9",
|
|
42
42
|
"css-loader": "^7.1.4",
|
|
43
43
|
"swc-loader": "^0.2.7",
|
|
44
44
|
"webpack": "^5.105.2",
|
|
45
45
|
"@lynx-js/css-extract-webpack-plugin": "0.7.0",
|
|
46
|
-
"@lynx-js/react": "0.
|
|
47
|
-
"@lynx-js/template-webpack-plugin": "0.10.6",
|
|
46
|
+
"@lynx-js/react": "0.118.0",
|
|
48
47
|
"@lynx-js/test-tools": "0.0.0",
|
|
48
|
+
"@lynx-js/template-webpack-plugin": "0.10.8",
|
|
49
49
|
"@lynx-js/vitest-setup": "0.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|