@lynx-js/react-rsbuild-plugin 0.18.3 → 0.19.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 +17 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +14 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @lynx-js/react-rsbuild-plugin
|
|
2
2
|
|
|
3
|
+
## 0.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Register the snapshot and worklet definitions collected from the background build on the main thread, so a definition the main-thread bundle dropped no longer fails with `Snapshot not found`. ([#3393](https://github.com/lynx-family/lynx-stack/pull/3393))
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Add `compat.transformLegacyEventAttributeNames` to disable legacy event attribute-name conversion independently from other compatibility transforms. ([#3475](https://github.com/lynx-family/lynx-stack/pull/3475))
|
|
12
|
+
- Updated dependencies [[`21528f1`](https://github.com/lynx-family/lynx-stack/commit/21528f12c347564c40bc0c15de3df7db5ce85afe), [`f391460`](https://github.com/lynx-family/lynx-stack/commit/f391460d176eb84cb30faa0ca1644be388ce216a), [`c58b6f9`](https://github.com/lynx-family/lynx-stack/commit/c58b6f91cf7084d2585f42e00db3dd699c27ed61), [`6cc9624`](https://github.com/lynx-family/lynx-stack/commit/6cc9624fb54dc7f73b6e68e49e2322b8136d3418), [`328f712`](https://github.com/lynx-family/lynx-stack/commit/328f7125d1881cf438e58aa749f1e554a756b652), [`c58b6f9`](https://github.com/lynx-family/lynx-stack/commit/c58b6f91cf7084d2585f42e00db3dd699c27ed61)]:
|
|
13
|
+
- @lynx-js/react-webpack-plugin@0.11.0
|
|
14
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.19.0
|
|
15
|
+
- @lynx-js/template-webpack-plugin@0.15.1
|
|
16
|
+
- @lynx-js/react-refresh-webpack-plugin@0.4.2
|
|
17
|
+
- @lynx-js/use-sync-external-store@1.5.0
|
|
18
|
+
- @lynx-js/css-extract-webpack-plugin@0.10.1
|
|
19
|
+
|
|
3
20
|
## 0.18.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -227,6 +227,17 @@ export declare interface CompatVisitorConfig {
|
|
|
227
227
|
* ```
|
|
228
228
|
*/
|
|
229
229
|
simplifyCtorLikeReactLynx2: boolean
|
|
230
|
+
/**
|
|
231
|
+
* @public
|
|
232
|
+
* Whether to transform legacy event attribute names on Lynx elements.
|
|
233
|
+
*
|
|
234
|
+
* When enabled, legacy event attributes such as `onClick` and
|
|
235
|
+
* `onClickCatch` are transformed to `bindtap` and `catchtap`.
|
|
236
|
+
* Disable this when another transform owns event attribute-name conversion.
|
|
237
|
+
*
|
|
238
|
+
* @defaultValue `true`
|
|
239
|
+
*/
|
|
240
|
+
transformLegacyEventAttributeNames?: boolean
|
|
230
241
|
/**
|
|
231
242
|
* @public
|
|
232
243
|
* Regular expression used to remove component attributes
|
package/dist/index.js
CHANGED
|
@@ -138,6 +138,7 @@ function applyEntry(api, options) {
|
|
|
138
138
|
const lazyBundleFetcher = resolveLazyBundleFetcher(targetSdkVersion);
|
|
139
139
|
api.modifyBundlerChain(async (chain, { environment, isDev, isProd })=>{
|
|
140
140
|
const mainThreadChunks = [];
|
|
141
|
+
const entryPairs = [];
|
|
141
142
|
const rsbuildConfig = api.getRsbuildConfig();
|
|
142
143
|
const userConfig = api.getRsbuildConfig('original');
|
|
143
144
|
const chunkSplitStrategy = userConfig.performance?.chunkSplit?.strategy;
|
|
@@ -174,6 +175,10 @@ function applyEntry(api, options) {
|
|
|
174
175
|
const backgroundName = node_path.posix.join(isLynx ? DEFAULT_DIST_PATH_INTERMEDIATE : '', getBackgroundFilename(entryName, environment.config, isProd, experimental_isLazyBundle));
|
|
175
176
|
const backgroundEntry = entryName;
|
|
176
177
|
mainThreadChunks.push(mainThreadName);
|
|
178
|
+
entryPairs.push({
|
|
179
|
+
mainThread: mainThreadEntry,
|
|
180
|
+
background: backgroundEntry
|
|
181
|
+
});
|
|
177
182
|
chain.entry(mainThreadEntry).add({
|
|
178
183
|
layer: LAYERS.MAIN_THREAD,
|
|
179
184
|
import: imports,
|
|
@@ -273,6 +278,7 @@ function applyEntry(api, options) {
|
|
|
273
278
|
globalPropsMode,
|
|
274
279
|
enableSSR,
|
|
275
280
|
mainThreadChunks,
|
|
281
|
+
entryPairs,
|
|
276
282
|
extractStr,
|
|
277
283
|
experimental_isLazyBundle,
|
|
278
284
|
experimental_useElementTemplate: options.experimental_useElementTemplate,
|
|
@@ -676,7 +682,7 @@ const validateConfig = (()=>{
|
|
|
676
682
|
if (void 0 === value) return true;
|
|
677
683
|
return false;
|
|
678
684
|
}));
|
|
679
|
-
const _io1 = (input, _exceptionable = true)=>(void 0 === input.componentsPkg || Array.isArray(input.componentsPkg) && input.componentsPkg.every((elem, _index2)=>"string" == typeof elem)) && (void 0 === input.oldRuntimePkg || Array.isArray(input.oldRuntimePkg) && input.oldRuntimePkg.every((elem, _index3)=>"string" == typeof elem)) && (void 0 === input.newRuntimePkg || "string" == typeof input.newRuntimePkg) && (void 0 === input.additionalComponentAttributes || Array.isArray(input.additionalComponentAttributes) && input.additionalComponentAttributes.every((elem, _index4)=>"string" == typeof elem)) && null !== input.addComponentElement && (void 0 === input.addComponentElement || "boolean" == typeof input.addComponentElement || "object" == typeof input.addComponentElement && null !== input.addComponentElement && _io2(input.addComponentElement, _exceptionable)) && (void 0 === input.simplifyCtorLikeReactLynx2 || "boolean" == typeof input.simplifyCtorLikeReactLynx2) && (void 0 === input.removeComponentAttrRegex || "string" == typeof input.removeComponentAttrRegex) && (void 0 === input.disableDeprecatedWarning || "boolean" == typeof input.disableDeprecatedWarning) && null !== input.darkMode && (void 0 === input.darkMode || "boolean" == typeof input.darkMode || "object" == typeof input.darkMode && null !== input.darkMode && _io3(input.darkMode, _exceptionable)) && (void 0 === input.legacySlot || "boolean" == typeof input.legacySlot) && (void 0 === input.disableCreateSelectorQueryIncompatibleWarning || "boolean" == typeof input.disableCreateSelectorQueryIncompatibleWarning) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
|
|
685
|
+
const _io1 = (input, _exceptionable = true)=>(void 0 === input.componentsPkg || Array.isArray(input.componentsPkg) && input.componentsPkg.every((elem, _index2)=>"string" == typeof elem)) && (void 0 === input.oldRuntimePkg || Array.isArray(input.oldRuntimePkg) && input.oldRuntimePkg.every((elem, _index3)=>"string" == typeof elem)) && (void 0 === input.newRuntimePkg || "string" == typeof input.newRuntimePkg) && (void 0 === input.additionalComponentAttributes || Array.isArray(input.additionalComponentAttributes) && input.additionalComponentAttributes.every((elem, _index4)=>"string" == typeof elem)) && null !== input.addComponentElement && (void 0 === input.addComponentElement || "boolean" == typeof input.addComponentElement || "object" == typeof input.addComponentElement && null !== input.addComponentElement && _io2(input.addComponentElement, _exceptionable)) && (void 0 === input.simplifyCtorLikeReactLynx2 || "boolean" == typeof input.simplifyCtorLikeReactLynx2) && (void 0 === input.transformLegacyEventAttributeNames || "boolean" == typeof input.transformLegacyEventAttributeNames) && (void 0 === input.removeComponentAttrRegex || "string" == typeof input.removeComponentAttrRegex) && (void 0 === input.disableDeprecatedWarning || "boolean" == typeof input.disableDeprecatedWarning) && null !== input.darkMode && (void 0 === input.darkMode || "boolean" == typeof input.darkMode || "object" == typeof input.darkMode && null !== input.darkMode && _io3(input.darkMode, _exceptionable)) && (void 0 === input.legacySlot || "boolean" == typeof input.legacySlot) && (void 0 === input.disableCreateSelectorQueryIncompatibleWarning || "boolean" == typeof input.disableCreateSelectorQueryIncompatibleWarning) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
|
|
680
686
|
if ([
|
|
681
687
|
"componentsPkg",
|
|
682
688
|
"oldRuntimePkg",
|
|
@@ -684,6 +690,7 @@ const validateConfig = (()=>{
|
|
|
684
690
|
"additionalComponentAttributes",
|
|
685
691
|
"addComponentElement",
|
|
686
692
|
"simplifyCtorLikeReactLynx2",
|
|
693
|
+
"transformLegacyEventAttributeNames",
|
|
687
694
|
"removeComponentAttrRegex",
|
|
688
695
|
"disableDeprecatedWarning",
|
|
689
696
|
"darkMode",
|
|
@@ -1047,6 +1054,11 @@ const validateConfig = (()=>{
|
|
|
1047
1054
|
path: _path + ".simplifyCtorLikeReactLynx2",
|
|
1048
1055
|
expected: "(boolean | undefined)",
|
|
1049
1056
|
value: input.simplifyCtorLikeReactLynx2
|
|
1057
|
+
}, _errorFactory)) && (void 0 === input.transformLegacyEventAttributeNames || "boolean" == typeof input.transformLegacyEventAttributeNames || _assertGuard(_exceptionable, {
|
|
1058
|
+
method: "typia.createAssertEquals",
|
|
1059
|
+
path: _path + ".transformLegacyEventAttributeNames",
|
|
1060
|
+
expected: "(boolean | undefined)",
|
|
1061
|
+
value: input.transformLegacyEventAttributeNames
|
|
1050
1062
|
}, _errorFactory)) && (void 0 === input.removeComponentAttrRegex || "string" == typeof input.removeComponentAttrRegex || _assertGuard(_exceptionable, {
|
|
1051
1063
|
method: "typia.createAssertEquals",
|
|
1052
1064
|
path: _path + ".removeComponentAttrRegex",
|
|
@@ -1090,6 +1102,7 @@ const validateConfig = (()=>{
|
|
|
1090
1102
|
"additionalComponentAttributes",
|
|
1091
1103
|
"addComponentElement",
|
|
1092
1104
|
"simplifyCtorLikeReactLynx2",
|
|
1105
|
+
"transformLegacyEventAttributeNames",
|
|
1093
1106
|
"removeComponentAttrRegex",
|
|
1094
1107
|
"disableDeprecatedWarning",
|
|
1095
1108
|
"darkMode",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-rsbuild-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "A rsbuild plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rsbuild",
|
|
@@ -34,36 +34,36 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"tiny-invariant": "^1.3.3",
|
|
36
36
|
"@lynx-js/css-extract-webpack-plugin": "0.10.1",
|
|
37
|
-
"@lynx-js/react-alias-rsbuild-plugin": "0.
|
|
38
|
-
"@lynx-js/react-refresh-webpack-plugin": "0.4.
|
|
39
|
-
"@lynx-js/react-webpack-plugin": "0.
|
|
37
|
+
"@lynx-js/react-alias-rsbuild-plugin": "0.19.0",
|
|
38
|
+
"@lynx-js/react-refresh-webpack-plugin": "0.4.2",
|
|
39
|
+
"@lynx-js/react-webpack-plugin": "0.11.0",
|
|
40
40
|
"@lynx-js/runtime-wrapper-webpack-plugin": "0.2.3",
|
|
41
|
-
"@lynx-js/template-webpack-plugin": "0.15.
|
|
41
|
+
"@lynx-js/template-webpack-plugin": "0.15.1",
|
|
42
42
|
"@lynx-js/use-sync-external-store": "1.5.0",
|
|
43
43
|
"background-only": "^0.0.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@microsoft/api-extractor": "7.58.12",
|
|
47
|
-
"@rsbuild/core": "2.1.
|
|
47
|
+
"@rsbuild/core": "2.1.10",
|
|
48
48
|
"@rsbuild/plugin-sass": "2.0.1",
|
|
49
49
|
"@rsbuild/plugin-typed-css-modules": "1.2.4",
|
|
50
|
-
"@rstest/core": "0.11.
|
|
50
|
+
"@rstest/core": "0.11.6",
|
|
51
51
|
"rsbuild-plugin-arethetypeswrong": "0.3.1",
|
|
52
52
|
"rsbuild-plugin-publint": "1.0.0",
|
|
53
|
-
"source-map": "^0.
|
|
53
|
+
"source-map": "^0.8.0",
|
|
54
54
|
"tailwindcss": "^3.4.19",
|
|
55
55
|
"type-fest": "^5.8.0",
|
|
56
56
|
"typia": "12.1.1",
|
|
57
57
|
"typia-rspack-plugin": "3.0.1",
|
|
58
58
|
"@lynx-js/config-rsbuild-plugin": "0.2.2",
|
|
59
59
|
"@lynx-js/debug-metadata": "0.1.0",
|
|
60
|
-
"@lynx-js/react": "0.
|
|
60
|
+
"@lynx-js/react": "0.124.0",
|
|
61
61
|
"@lynx-js/react-transform": "0.2.0",
|
|
62
|
-
"@lynx-js/rspeedy": "0.16.
|
|
62
|
+
"@lynx-js/rspeedy": "0.16.4",
|
|
63
63
|
"@lynx-js/test-tools": "0.0.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@lynx-js/react": "^0.
|
|
66
|
+
"@lynx-js/react": "^0.124.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependenciesMeta": {
|
|
69
69
|
"@lynx-js/react": {
|