@lynx-js/react-webpack-plugin-canary 0.7.2-canary-20251108-3bc8903d → 0.7.2
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 +16 -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.7.2
|
|
3
|
+
## 0.7.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -60,16 +60,16 @@
|
|
|
60
60
|
type InlineChunkConfig =
|
|
61
61
|
| boolean
|
|
62
62
|
| InlineChunkTest
|
|
63
|
-
| { enable?: boolean |
|
|
63
|
+
| { enable?: boolean | 'auto'; test: InlineChunkTest };
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
```ts
|
|
67
|
-
import { defineConfig } from
|
|
67
|
+
import { defineConfig } from '@lynx-js/rspeedy';
|
|
68
68
|
|
|
69
69
|
export default defineConfig({
|
|
70
70
|
output: {
|
|
71
71
|
inlineScripts: ({ name, size }) => {
|
|
72
|
-
return name.includes(
|
|
72
|
+
return name.includes('foo') && size < 1000;
|
|
73
73
|
},
|
|
74
74
|
},
|
|
75
75
|
});
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
- Shake `useImperativeHandle` on the main-thread by default. ([#153](https://github.com/lynx-family/lynx-stack/pull/153))
|
|
154
154
|
|
|
155
155
|
```js
|
|
156
|
-
import { forwardRef, useImperativeHandle } from
|
|
156
|
+
import { forwardRef, useImperativeHandle } from '@lynx-js/react';
|
|
157
157
|
|
|
158
158
|
export default forwardRef(function App(_, ref) {
|
|
159
159
|
useImperativeHandle(ref, () => {
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
return {
|
|
162
162
|
name() {
|
|
163
163
|
// This should be considered as background only
|
|
164
|
-
console.info(
|
|
164
|
+
console.info('This should not exist in main-thread');
|
|
165
165
|
},
|
|
166
166
|
};
|
|
167
167
|
});
|
|
@@ -221,14 +221,14 @@
|
|
|
221
221
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
222
222
|
|
|
223
223
|
```js
|
|
224
|
-
import { pluginReactLynx } from
|
|
225
|
-
import { defineConfig } from
|
|
224
|
+
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin';
|
|
225
|
+
import { defineConfig } from '@lynx-js/rspeedy';
|
|
226
226
|
|
|
227
227
|
export default defineConfig({
|
|
228
228
|
plugins: [
|
|
229
229
|
pluginReactLynx({
|
|
230
230
|
defineDCE: {
|
|
231
|
-
__SOME_FALSE_DEFINE__:
|
|
231
|
+
__SOME_FALSE_DEFINE__: 'false',
|
|
232
232
|
},
|
|
233
233
|
}),
|
|
234
234
|
],
|
|
@@ -240,20 +240,20 @@
|
|
|
240
240
|
For example, `import` initialized by dead code will be removed:
|
|
241
241
|
|
|
242
242
|
```js
|
|
243
|
-
import { foo } from
|
|
243
|
+
import { foo } from 'bar';
|
|
244
244
|
|
|
245
245
|
if (__SOME_FALSE_DEFINE__) {
|
|
246
246
|
foo();
|
|
247
|
-
console.log(
|
|
247
|
+
console.log('dead code');
|
|
248
248
|
} else {
|
|
249
|
-
console.log(
|
|
249
|
+
console.log('reachable code');
|
|
250
250
|
}
|
|
251
251
|
```
|
|
252
252
|
|
|
253
253
|
will be transformed to:
|
|
254
254
|
|
|
255
255
|
```js
|
|
256
|
-
console.log(
|
|
256
|
+
console.log('reachable code');
|
|
257
257
|
```
|
|
258
258
|
|
|
259
259
|
## 0.6.0
|
|
@@ -263,14 +263,14 @@
|
|
|
263
263
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
264
264
|
|
|
265
265
|
```js
|
|
266
|
-
import { pluginReactLynx } from
|
|
267
|
-
import { defineConfig } from
|
|
266
|
+
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin';
|
|
267
|
+
import { defineConfig } from '@lynx-js/rspeedy';
|
|
268
268
|
|
|
269
269
|
export default defineConfig({
|
|
270
270
|
plugins: [
|
|
271
271
|
pluginReactLynx({
|
|
272
272
|
compat: {
|
|
273
|
-
removeComponentAttrRegex:
|
|
273
|
+
removeComponentAttrRegex: 'YOUR REGEX',
|
|
274
274
|
},
|
|
275
275
|
}),
|
|
276
276
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-webpack-plugin-canary",
|
|
3
|
-
"version": "0.7.2
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "A webpack plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"swc-loader": "^0.2.6",
|
|
44
44
|
"webpack": "^5.102.0",
|
|
45
45
|
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.6.4",
|
|
46
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.114.4",
|
|
46
47
|
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.9.1",
|
|
47
48
|
"@lynx-js/vitest-setup": "0.0.0",
|
|
48
|
-
"@lynx-js/react": "npm:@lynx-js/react-canary@0.114.4-canary-20251108-3bc8903d",
|
|
49
49
|
"@lynx-js/test-tools": "0.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|