@lynx-js/react-rsbuild-plugin-canary 0.10.0-canary-20250523-790e6b63 → 0.10.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 +37 -37
- package/dist/index.js +1 -2
- package/package.json +9 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lynx-js/react-rsbuild-plugin
|
|
2
2
|
|
|
3
|
-
## 0.10.0
|
|
3
|
+
## 0.10.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -15,25 +15,25 @@
|
|
|
15
15
|
example:
|
|
16
16
|
|
|
17
17
|
```js
|
|
18
|
-
import { defineConfig } from
|
|
18
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
19
19
|
|
|
20
20
|
export default defineConfig({
|
|
21
21
|
output: {
|
|
22
22
|
inlineScripts: false,
|
|
23
23
|
},
|
|
24
|
-
})
|
|
24
|
+
})
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
- Support `@lynx-js/react` v0.109.0. ([#840](https://github.com/lynx-family/lynx-stack/pull/840))
|
|
28
28
|
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- @lynx-js/
|
|
33
|
-
- @lynx-js/
|
|
34
|
-
- @lynx-js/react-webpack-plugin@0.
|
|
35
|
-
- @lynx-js/
|
|
36
|
-
- @lynx-js/react-alias-rsbuild-plugin@0.10.0
|
|
29
|
+
- Use `WebEncodePlugin` instead of `WebWebpackPlugin`. ([#904](https://github.com/lynx-family/lynx-stack/pull/904))
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [[`7beb35e`](https://github.com/lynx-family/lynx-stack/commit/7beb35ebf72f9475c0a200c93c6b9bdaa7980e1b), [`b6e27da`](https://github.com/lynx-family/lynx-stack/commit/b6e27daf865b0627b1c3238228a4fdf65ad87ee3), [`5ddec12`](https://github.com/lynx-family/lynx-stack/commit/5ddec124ab26e61e415576d575a400e76c7bd8d2), [`77524bc`](https://github.com/lynx-family/lynx-stack/commit/77524bcf502675a182923823bf5c892846e0c729), [`fdab5dc`](https://github.com/lynx-family/lynx-stack/commit/fdab5dc9d624de0b39957695599cc8eebab90973), [`ff63b58`](https://github.com/lynx-family/lynx-stack/commit/ff63b58af137be5265458cb08db9af0aaa69c416), [`fdab5dc`](https://github.com/lynx-family/lynx-stack/commit/fdab5dc9d624de0b39957695599cc8eebab90973), [`2b83934`](https://github.com/lynx-family/lynx-stack/commit/2b83934f12c9ad9ed46ef76233d5bb12a1e6af23), [`3520031`](https://github.com/lynx-family/lynx-stack/commit/352003113596692c34d98644db401ece362bc936)]:
|
|
32
|
+
- @lynx-js/template-webpack-plugin@0.7.0
|
|
33
|
+
- @lynx-js/css-extract-webpack-plugin@0.5.4
|
|
34
|
+
- @lynx-js/react-refresh-webpack-plugin@0.3.3
|
|
35
|
+
- @lynx-js/react-webpack-plugin@0.6.14
|
|
36
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.10.0
|
|
37
37
|
|
|
38
38
|
## 0.9.10
|
|
39
39
|
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
Now you can override configuration like `useDefineForClassFields` using `tools.swc`.
|
|
109
109
|
|
|
110
110
|
```js
|
|
111
|
-
import { defineConfig } from
|
|
111
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
112
112
|
|
|
113
113
|
export default defineConfig({
|
|
114
114
|
tools: {
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
},
|
|
121
121
|
},
|
|
122
122
|
},
|
|
123
|
-
})
|
|
123
|
+
})
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
- Updated dependencies [[`f1ca29b`](https://github.com/lynx-family/lynx-stack/commit/f1ca29bd766377dd46583f15e1e75bca447699cd)]:
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
You may turn it off using `output.minify.css: false`:
|
|
297
297
|
|
|
298
298
|
```js
|
|
299
|
-
import { defineConfig } from
|
|
299
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
300
300
|
|
|
301
301
|
export default defineConfig({
|
|
302
302
|
output: {
|
|
@@ -304,18 +304,18 @@
|
|
|
304
304
|
css: false,
|
|
305
305
|
},
|
|
306
306
|
},
|
|
307
|
-
})
|
|
307
|
+
})
|
|
308
308
|
```
|
|
309
309
|
|
|
310
310
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
311
311
|
|
|
312
312
|
```js
|
|
313
|
-
import { defineConfig } from
|
|
314
|
-
import { pluginCssMinimizer } from
|
|
313
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
314
|
+
import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
|
|
315
315
|
|
|
316
316
|
export default defineConfig({
|
|
317
317
|
plugins: [pluginCssMinimizer()],
|
|
318
|
-
})
|
|
318
|
+
})
|
|
319
319
|
```
|
|
320
320
|
|
|
321
321
|
### Patch Changes
|
|
@@ -395,18 +395,18 @@
|
|
|
395
395
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
396
396
|
|
|
397
397
|
```js
|
|
398
|
-
import { pluginReactLynx } from
|
|
399
|
-
import { defineConfig } from
|
|
398
|
+
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
|
|
399
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
400
400
|
|
|
401
401
|
export default defineConfig({
|
|
402
402
|
plugins: [
|
|
403
403
|
pluginReactLynx({
|
|
404
404
|
defineDCE: {
|
|
405
|
-
__SOME_FALSE_DEFINE__:
|
|
405
|
+
__SOME_FALSE_DEFINE__: 'false',
|
|
406
406
|
},
|
|
407
407
|
}),
|
|
408
408
|
],
|
|
409
|
-
})
|
|
409
|
+
})
|
|
410
410
|
```
|
|
411
411
|
|
|
412
412
|
Different from `define` provided by bundlers like webpack, `defineDCE` works at transform time and a extra DCE (Dead Code Elimination) pass will be performed.
|
|
@@ -414,20 +414,20 @@
|
|
|
414
414
|
For example, `import` initialized by dead code will be removed:
|
|
415
415
|
|
|
416
416
|
```js
|
|
417
|
-
import { foo } from
|
|
417
|
+
import { foo } from 'bar'
|
|
418
418
|
|
|
419
419
|
if (__SOME_FALSE_DEFINE__) {
|
|
420
|
-
foo()
|
|
421
|
-
console.log(
|
|
420
|
+
foo()
|
|
421
|
+
console.log('dead code')
|
|
422
422
|
} else {
|
|
423
|
-
console.log(
|
|
423
|
+
console.log('reachable code')
|
|
424
424
|
}
|
|
425
425
|
```
|
|
426
426
|
|
|
427
427
|
will be transformed to:
|
|
428
428
|
|
|
429
429
|
```js
|
|
430
|
-
console.log(
|
|
430
|
+
console.log('reachable code')
|
|
431
431
|
```
|
|
432
432
|
|
|
433
433
|
- Updated dependencies [8dd6cca]
|
|
@@ -470,18 +470,18 @@
|
|
|
470
470
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
471
471
|
|
|
472
472
|
```js
|
|
473
|
-
import { pluginReactLynx } from
|
|
474
|
-
import { defineConfig } from
|
|
473
|
+
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
|
|
474
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
475
475
|
|
|
476
476
|
export default defineConfig({
|
|
477
477
|
plugins: [
|
|
478
478
|
pluginReactLynx({
|
|
479
479
|
compat: {
|
|
480
|
-
removeComponentAttrRegex:
|
|
480
|
+
removeComponentAttrRegex: 'YOUR REGEX',
|
|
481
481
|
},
|
|
482
482
|
}),
|
|
483
483
|
],
|
|
484
|
-
})
|
|
484
|
+
})
|
|
485
485
|
```
|
|
486
486
|
|
|
487
487
|
NOTE: This feature is deprecated and will be removed in the future. Use CodeMod instead.
|
|
@@ -500,11 +500,11 @@
|
|
|
500
500
|
|
|
501
501
|
```javascript
|
|
502
502
|
// bar.ts
|
|
503
|
-
import
|
|
503
|
+
import 'background-only'
|
|
504
504
|
|
|
505
505
|
export const bar = () => {
|
|
506
|
-
return
|
|
507
|
-
}
|
|
506
|
+
return 'bar'
|
|
507
|
+
}
|
|
508
508
|
```
|
|
509
509
|
|
|
510
510
|
If `bar` is called in `main-thread`, build time error will be triggered.
|
|
@@ -513,15 +513,15 @@
|
|
|
513
513
|
|
|
514
514
|
```tsx
|
|
515
515
|
// App.tsx
|
|
516
|
-
import { bar } from
|
|
516
|
+
import { bar } from './bar.js'
|
|
517
517
|
|
|
518
518
|
function App() {
|
|
519
|
-
bar()
|
|
519
|
+
bar()
|
|
520
520
|
return (
|
|
521
521
|
<view>
|
|
522
522
|
<text>Hello, Lynx x rspeedy</text>
|
|
523
523
|
</view>
|
|
524
|
-
)
|
|
524
|
+
)
|
|
525
525
|
}
|
|
526
526
|
```
|
|
527
527
|
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,6 @@ import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__ from "node:url";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_template_webpack_plugin_e98d2f08__ from "@lynx-js/template-webpack-plugin";
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_runtime_wrapper_webpack_plugin_27793081__ from "@lynx-js/runtime-wrapper-webpack-plugin";
|
|
8
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_web_webpack_plugin_6ba19e5a__ from "@lynx-js/web-webpack-plugin";
|
|
9
8
|
import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_react_refresh_webpack_plugin_a01c5e97__ from "@lynx-js/react-refresh-webpack-plugin";
|
|
10
9
|
var __webpack_modules__ = {
|
|
11
10
|
"../../../node_modules/.pnpm/typia@9.3.1_@samchon+openapi@4.3.2_typescript@5.8.3/node_modules/typia/lib/internal/_accessExpressionAsString.js": function(__unused_webpack_module, exports) {
|
|
@@ -331,7 +330,7 @@ function applyEntry(api, options) {
|
|
|
331
330
|
}
|
|
332
331
|
]).end();
|
|
333
332
|
}
|
|
334
|
-
if (isWeb) chain.plugin(PLUGIN_NAME_WEB).use(
|
|
333
|
+
if (isWeb) chain.plugin(PLUGIN_NAME_WEB).use(__WEBPACK_EXTERNAL_MODULE__lynx_js_template_webpack_plugin_e98d2f08__.WebEncodePlugin, []).end();
|
|
335
334
|
const rsbuildConfig = api.getRsbuildConfig();
|
|
336
335
|
chain.plugin(PLUGIN_NAME_REACT).after(PLUGIN_NAME_TEMPLATE).use(__WEBPACK_EXTERNAL_MODULE__lynx_js_react_webpack_plugin_1806f3f7__.ReactWebpackPlugin, [
|
|
337
336
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-rsbuild-plugin-canary",
|
|
3
|
-
"version": "0.10.0
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "A rsbuild plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rsbuild",
|
|
@@ -32,13 +32,12 @@
|
|
|
32
32
|
"README.md"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.5.4
|
|
36
|
-
"@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.10.0
|
|
37
|
-
"@lynx-js/react-refresh-webpack-plugin": "npm:@lynx-js/react-refresh-webpack-plugin-canary@0.3.3
|
|
38
|
-
"@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.6.14
|
|
35
|
+
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.5.4",
|
|
36
|
+
"@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.10.0",
|
|
37
|
+
"@lynx-js/react-refresh-webpack-plugin": "npm:@lynx-js/react-refresh-webpack-plugin-canary@0.3.3",
|
|
38
|
+
"@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.6.14",
|
|
39
39
|
"@lynx-js/runtime-wrapper-webpack-plugin": "npm:@lynx-js/runtime-wrapper-webpack-plugin-canary@0.1.0",
|
|
40
|
-
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.7.0
|
|
41
|
-
"@lynx-js/web-webpack-plugin": "npm:@lynx-js/web-webpack-plugin-canary@0.6.8-canary-20250523-790e6b63",
|
|
40
|
+
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.7.0",
|
|
42
41
|
"background-only": "npm:background-only-canary@0.0.1"
|
|
43
42
|
},
|
|
44
43
|
"devDependencies": {
|
|
@@ -54,10 +53,10 @@
|
|
|
54
53
|
"type-fest": "^4.41.0",
|
|
55
54
|
"typia": "9.3.1",
|
|
56
55
|
"typia-rspack-plugin": "2.1.0",
|
|
57
|
-
"@lynx-js/react": "npm:@lynx-js/react-canary@0.109.0
|
|
56
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.109.0",
|
|
58
57
|
"@lynx-js/react-transform": "0.2.0",
|
|
59
|
-
"@lynx-js/
|
|
60
|
-
"@lynx-js/
|
|
58
|
+
"@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.9.6",
|
|
59
|
+
"@lynx-js/vitest-setup": "0.0.0"
|
|
61
60
|
},
|
|
62
61
|
"peerDependencies": {
|
|
63
62
|
"@lynx-js/react": "*"
|