@lynx-js/react-alias-rsbuild-plugin 0.10.1 → 0.10.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 +6 -0
- package/dist/index.js +14 -6
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -29,17 +29,25 @@ function pluginReactAlias(options) {
|
|
|
29
29
|
}
|
|
30
30
|
}));
|
|
31
31
|
api.modifyBundlerChain(async (chain)=>{
|
|
32
|
+
const [jsxRuntimeBackground, jsxRuntimeMainThread, jsxDevRuntimeBackground, jsxDevRuntimeMainThread, reactLepusBackground, reactLepusMainThread] = await Promise.all([
|
|
33
|
+
resolve('@lynx-js/react/jsx-runtime'),
|
|
34
|
+
resolve('@lynx-js/react/lepus/jsx-runtime'),
|
|
35
|
+
resolve('@lynx-js/react/jsx-dev-runtime'),
|
|
36
|
+
resolve('@lynx-js/react/lepus/jsx-dev-runtime'),
|
|
37
|
+
resolve('@lynx-js/react'),
|
|
38
|
+
resolve('@lynx-js/react/lepus')
|
|
39
|
+
]);
|
|
32
40
|
const jsxRuntime = {
|
|
33
|
-
background:
|
|
34
|
-
mainThread:
|
|
41
|
+
background: jsxRuntimeBackground,
|
|
42
|
+
mainThread: jsxRuntimeMainThread
|
|
35
43
|
};
|
|
36
44
|
const jsxDevRuntime = {
|
|
37
|
-
background:
|
|
38
|
-
mainThread:
|
|
45
|
+
background: jsxDevRuntimeBackground,
|
|
46
|
+
mainThread: jsxDevRuntimeMainThread
|
|
39
47
|
};
|
|
40
48
|
const reactLepus = {
|
|
41
|
-
background:
|
|
42
|
-
mainThread:
|
|
49
|
+
background: reactLepusBackground,
|
|
50
|
+
mainThread: reactLepusMainThread
|
|
43
51
|
};
|
|
44
52
|
chain.module.rule('react:jsx-runtime:main-thread').issuerLayer(LAYERS.MAIN_THREAD).resolve.alias.set('react/jsx-runtime', jsxRuntime.mainThread).set('react/jsx-dev-runtime', jsxDevRuntime.mainThread).set('@lynx-js/react/jsx-runtime', jsxRuntime.mainThread).set('@lynx-js/react/jsx-dev-runtime', jsxDevRuntime.mainThread).set('@lynx-js/react/lepus$', reactLepus.mainThread).set('@lynx-js/react/lepus/jsx-runtime', jsxRuntime.mainThread).set('@lynx-js/react/lepus/jsx-dev-runtime', jsxDevRuntime.mainThread).end().end().end().rule('react:jsx-runtime:background').issuerLayer(LAYERS.BACKGROUND).resolve.alias.set('react/jsx-runtime', jsxRuntime.background).set('react/jsx-dev-runtime', jsxDevRuntime.background).set('@lynx-js/react/jsx-runtime', jsxRuntime.background).set('@lynx-js/react/jsx-dev-runtime', jsxDevRuntime.background).set('@lynx-js/react/lepus$', reactLepus.background).end().end().end().end();
|
|
45
53
|
const transformedEntries = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-alias-rsbuild-plugin",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "A rsbuild plugin for making alias in ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rsbuild",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@microsoft/api-extractor": "7.52.8",
|
|
39
39
|
"@rsbuild/core": "1.3.21",
|
|
40
|
-
"@lynx-js/react": "0.109.
|
|
41
|
-
"@lynx-js/react-webpack-plugin": "0.6.
|
|
40
|
+
"@lynx-js/react": "0.109.1",
|
|
41
|
+
"@lynx-js/react-webpack-plugin": "0.6.15",
|
|
42
42
|
"@lynx-js/vitest-setup": "0.0.0"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|