@lynx-js/react-rsbuild-plugin-canary 0.11.1-canary-20251001-734ff75a → 0.11.2-canary-20251010-e21c4e23
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 +17 -5
- package/dist/index.js +18 -8
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
# @lynx-js/react-rsbuild-plugin
|
|
2
2
|
|
|
3
|
-
## 0.11.
|
|
3
|
+
## 0.11.2-canary-20251010135203-e21c4e23ca87c0783faaa4cfd2f8dfe6ca6d84eb
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- @lynx-js/react
|
|
7
|
+
- Fix using wrong version of `@lynx-js/react/refresh`. ([#1756](https://github.com/lynx-family/lynx-stack/pull/1756))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`2da147d`](https://github.com/lynx-family/lynx-stack/commit/2da147d28e1ea3e48eeaba4eac9923e0285300d4)]:
|
|
10
|
+
- @lynx-js/react@0.114.2-canary-20251010135203-e21c4e23ca87c0783faaa4cfd2f8dfe6ca6d84eb
|
|
11
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.11.2-canary-20251010135203-e21c4e23ca87c0783faaa4cfd2f8dfe6ca6d84eb
|
|
12
|
+
- @lynx-js/use-sync-external-store@1.5.0
|
|
13
|
+
- @lynx-js/react-refresh-webpack-plugin@0.3.4
|
|
14
|
+
- @lynx-js/react-webpack-plugin@0.7.1
|
|
15
|
+
|
|
16
|
+
## 0.11.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`19f823a`](https://github.com/lynx-family/lynx-stack/commit/19f823aae4ce6d99c173d28d157b7514ae8453cf)]:
|
|
21
|
+
- @lynx-js/css-extract-webpack-plugin@0.6.4
|
|
22
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.11.1
|
|
11
23
|
- @lynx-js/use-sync-external-store@1.5.0
|
|
12
24
|
- @lynx-js/react-refresh-webpack-plugin@0.3.4
|
|
13
25
|
- @lynx-js/react-webpack-plugin@0.7.1
|
package/dist/index.js
CHANGED
|
@@ -512,20 +512,30 @@ function applyLoaders(api, options) {
|
|
|
512
512
|
});
|
|
513
513
|
}
|
|
514
514
|
const PLUGIN_NAME_REACT_REFRESH = 'lynx:react:refresh';
|
|
515
|
-
const refresh_require = createRequire(import.meta.url);
|
|
516
515
|
function applyRefresh(api) {
|
|
517
|
-
api.modifyWebpackChain((chain, { CHAIN_ID, isProd })=>{
|
|
518
|
-
if (!isProd) applyRefreshRules(chain, CHAIN_ID, ReactRefreshWebpackPlugin);
|
|
516
|
+
api.modifyWebpackChain(async (chain, { CHAIN_ID, isProd })=>{
|
|
517
|
+
if (!isProd) await applyRefreshRules(api, chain, CHAIN_ID, ReactRefreshWebpackPlugin);
|
|
519
518
|
});
|
|
520
|
-
api.modifyBundlerChain((chain, { isProd, CHAIN_ID })=>{
|
|
519
|
+
api.modifyBundlerChain(async (chain, { isProd, CHAIN_ID })=>{
|
|
521
520
|
if (!isProd) {
|
|
522
|
-
|
|
523
|
-
|
|
521
|
+
const { resolve } = api.useExposed(Symbol.for('@lynx-js/react/internal:resolve'));
|
|
522
|
+
await Promise.all([
|
|
523
|
+
applyRefreshRules(api, chain, CHAIN_ID, ReactRefreshRspackPlugin),
|
|
524
|
+
resolve('@lynx-js/react/refresh').then((refresh)=>{
|
|
525
|
+
chain.resolve.alias.set('@lynx-js/react/refresh$', refresh);
|
|
526
|
+
})
|
|
527
|
+
]);
|
|
524
528
|
}
|
|
525
529
|
});
|
|
526
530
|
}
|
|
527
|
-
function applyRefreshRules(chain, CHAIN_ID, ReactRefreshPlugin) {
|
|
528
|
-
|
|
531
|
+
async function applyRefreshRules(api, chain, CHAIN_ID, ReactRefreshPlugin) {
|
|
532
|
+
const { resolve } = api.useExposed(Symbol.for('@lynx-js/react/internal:resolve'));
|
|
533
|
+
const [reactRuntime, refresh, workletRuntime] = await Promise.all([
|
|
534
|
+
resolve('@lynx-js/react/package.json'),
|
|
535
|
+
resolve('@lynx-js/react/refresh'),
|
|
536
|
+
resolve('@lynx-js/react/worklet-runtime')
|
|
537
|
+
]);
|
|
538
|
+
chain.plugin(PLUGIN_NAME_REACT_REFRESH).before(CHAIN_ID.PLUGIN.HMR).use(ReactRefreshPlugin).end().module.rule('react:refresh').issuerLayer(LAYERS.BACKGROUND).before(CHAIN_ID.RULE.JS).test(/\.[jt]sx$/).exclude.add(/node_modules/).add(external_node_path_["default"].dirname(reactRuntime)).add(external_node_path_["default"].dirname(refresh)).add(external_node_path_["default"].dirname(workletRuntime)).add(ReactRefreshPlugin.loader).end().use('ReactRefresh').loader(ReactRefreshPlugin.loader).options({}).end().end().end().end();
|
|
529
539
|
}
|
|
530
540
|
const isPlainObject = (obj)=>null !== obj && 'object' == typeof obj && '[object Object]' === Object.prototype.toString.call(obj);
|
|
531
541
|
const applySplitChunksRule = (api)=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-rsbuild-plugin-canary",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2-canary-20251010-e21c4e23",
|
|
4
4
|
"description": "A rsbuild plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rsbuild",
|
|
@@ -32,8 +32,8 @@
|
|
|
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.6.4
|
|
36
|
-
"@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.11.
|
|
35
|
+
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.6.4",
|
|
36
|
+
"@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.11.2-canary-20251010-e21c4e23",
|
|
37
37
|
"@lynx-js/react-refresh-webpack-plugin": "npm:@lynx-js/react-refresh-webpack-plugin-canary@0.3.4",
|
|
38
38
|
"@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.7.1",
|
|
39
39
|
"@lynx-js/runtime-wrapper-webpack-plugin": "npm:@lynx-js/runtime-wrapper-webpack-plugin-canary@0.1.3",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"rsbuild-plugin-arethetypeswrong": "0.1.1",
|
|
51
51
|
"rsbuild-plugin-publint": "0.3.3",
|
|
52
52
|
"tailwindcss": "^3.4.17",
|
|
53
|
-
"type-fest": "^
|
|
53
|
+
"type-fest": "^5.0.1",
|
|
54
54
|
"typia": "9.7.2",
|
|
55
55
|
"typia-rspack-plugin": "2.2.2",
|
|
56
|
-
"@lynx-js/react": "npm:@lynx-js/react-canary@0.114.
|
|
56
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.114.2-canary-20251010-e21c4e23",
|
|
57
57
|
"@lynx-js/react-transform": "0.2.0",
|
|
58
|
-
"@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.11.
|
|
58
|
+
"@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.11.6-canary-20251010-e21c4e23",
|
|
59
59
|
"@lynx-js/vitest-setup": "0.0.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|