@lynx-js/react-rsbuild-plugin 0.16.1 → 0.16.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 +12 -0
- package/dist/208.js +13 -2
- package/dist/index.d.ts +7 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @lynx-js/react-rsbuild-plugin
|
|
2
2
|
|
|
3
|
+
## 0.16.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`3e627b3`](https://github.com/lynx-family/lynx-stack/commit/3e627b337ca23d3cd8a41dbbf68568633f046e6d), [`7b8d63c`](https://github.com/lynx-family/lynx-stack/commit/7b8d63c2f996421634095e0fbdd8b5f3251486f9), [`13a0776`](https://github.com/lynx-family/lynx-stack/commit/13a0776fe2c8c7fc86c142f949436dffb78585ee), [`a973c54`](https://github.com/lynx-family/lynx-stack/commit/a973c545cf4f0e907dbf55db83ddb4bca1f48c23), [`353b1b7`](https://github.com/lynx-family/lynx-stack/commit/353b1b7dade99f9ca45ddaebb2e9644100e9e18c)]:
|
|
8
|
+
- @lynx-js/template-webpack-plugin@0.11.1
|
|
9
|
+
- @lynx-js/react-refresh-webpack-plugin@0.3.6
|
|
10
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.16.2
|
|
11
|
+
- @lynx-js/use-sync-external-store@1.5.0
|
|
12
|
+
- @lynx-js/react-webpack-plugin@0.9.2
|
|
13
|
+
- @lynx-js/css-extract-webpack-plugin@0.7.1
|
|
14
|
+
|
|
3
15
|
## 0.16.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/208.js
CHANGED
|
@@ -320,6 +320,7 @@ function applyEntry(api, options) {
|
|
|
320
320
|
mainThreadChunks,
|
|
321
321
|
extractStr,
|
|
322
322
|
experimental_isLazyBundle,
|
|
323
|
+
experimental_useElementTemplate: options.experimental_useElementTemplate,
|
|
323
324
|
profile: getDefaultProfile(),
|
|
324
325
|
workletRuntimePath: await resolve(`@lynx-js/react/${isDev ? 'worklet-dev-runtime' : 'worklet-runtime'}`)
|
|
325
326
|
}
|
|
@@ -398,7 +399,7 @@ function applyLazy(api) {
|
|
|
398
399
|
function getLoaderOptions(api, options, isMainThread = false) {
|
|
399
400
|
const { output } = api.getRsbuildConfig();
|
|
400
401
|
const inlineSourcesContent = output?.sourceMap === true || !(output?.sourceMap === false || output?.sourceMap?.js === false || output?.sourceMap?.js?.includes('nosources'));
|
|
401
|
-
const { compat, enableRemoveCSSScope, shake, defineDCE, engineVersion, enableUiSourceMap, experimental_isLazyBundle } = options;
|
|
402
|
+
const { compat, enableRemoveCSSScope, shake, defineDCE, engineVersion, enableUiSourceMap, experimental_isLazyBundle, experimental_useElementTemplate } = options;
|
|
402
403
|
return {
|
|
403
404
|
compat,
|
|
404
405
|
enableRemoveCSSScope,
|
|
@@ -406,6 +407,7 @@ function getLoaderOptions(api, options, isMainThread = false) {
|
|
|
406
407
|
inlineSourcesContent,
|
|
407
408
|
defineDCE,
|
|
408
409
|
engineVersion,
|
|
410
|
+
experimental_useElementTemplate,
|
|
409
411
|
...isMainThread ? {
|
|
410
412
|
enableUiSourceMap,
|
|
411
413
|
shake
|
|
@@ -607,7 +609,7 @@ function applyUseSyncExternalStore(api) {
|
|
|
607
609
|
const _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@10.1.0_typescript@5.9.3/node_modules/typia/lib/internal/_assertGuard.js");
|
|
608
610
|
const _accessExpressionAsString = __webpack_require__("../../../node_modules/.pnpm/typia@10.1.0_typescript@5.9.3/node_modules/typia/lib/internal/_accessExpressionAsString.js");
|
|
609
611
|
const validateConfig = (()=>{
|
|
610
|
-
const _io0 = (input, _exceptionable = true)=>(void 0 === input.enableUiSourceMap || "boolean" == typeof input.enableUiSourceMap) && (void 0 === input.compat || "object" == typeof input.compat && null !== input.compat && false === Array.isArray(input.compat) && _io1(input.compat, _exceptionable)) && (void 0 === input.customCSSInheritanceList || Array.isArray(input.customCSSInheritanceList) && input.customCSSInheritanceList.every((elem, _index1)=>"string" == typeof elem)) && (void 0 === input.debugInfoOutside || "boolean" == typeof input.debugInfoOutside) && (void 0 === input.defaultDisplayLinear || "boolean" == typeof input.defaultDisplayLinear) && (void 0 === input.enableAccessibilityElement || "boolean" == typeof input.enableAccessibilityElement) && (void 0 === input.enableCSSInheritance || "boolean" == typeof input.enableCSSInheritance) && (void 0 === input.enableCSSInvalidation || "boolean" == typeof input.enableCSSInvalidation) && (void 0 === input.enableCSSSelector || "boolean" == typeof input.enableCSSSelector) && (void 0 === input.enableNewGesture || "boolean" == typeof input.enableNewGesture) && (void 0 === input.enableRemoveCSSScope || "boolean" == typeof input.enableRemoveCSSScope) && (void 0 === input.firstScreenSyncTiming || "immediately" === input.firstScreenSyncTiming || "jsReady" === input.firstScreenSyncTiming) && (void 0 === input.enableSSR || "boolean" == typeof input.enableSSR) && (void 0 === input.removeDescendantSelectorScope || "boolean" == typeof input.removeDescendantSelectorScope) && (void 0 === input.shake || "object" == typeof input.shake && null !== input.shake && false === Array.isArray(input.shake) && _io4(input.shake, _exceptionable)) && (void 0 === input.defineDCE || "object" == typeof input.defineDCE && null !== input.defineDCE && false === Array.isArray(input.defineDCE) && _io5(input.defineDCE, _exceptionable)) && (void 0 === input.engineVersion || "string" == typeof input.engineVersion) && (void 0 === input.targetSdkVersion || "string" == typeof input.targetSdkVersion) && (void 0 === input.globalPropsMode || "reactive" === input.globalPropsMode || "event" === input.globalPropsMode) && null !== input.extractStr && (void 0 === input.extractStr || "boolean" == typeof input.extractStr || "object" == typeof input.extractStr && null !== input.extractStr && false === Array.isArray(input.extractStr) && _io7(input.extractStr, _exceptionable)) && (void 0 === input.experimental_isLazyBundle || "boolean" == typeof input.experimental_isLazyBundle) && null !== input.optimizeBundleSize && (void 0 === input.optimizeBundleSize || "boolean" == typeof input.optimizeBundleSize || "object" == typeof input.optimizeBundleSize && null !== input.optimizeBundleSize && false === Array.isArray(input.optimizeBundleSize) && _io8(input.optimizeBundleSize, _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
|
|
612
|
+
const _io0 = (input, _exceptionable = true)=>(void 0 === input.enableUiSourceMap || "boolean" == typeof input.enableUiSourceMap) && (void 0 === input.compat || "object" == typeof input.compat && null !== input.compat && false === Array.isArray(input.compat) && _io1(input.compat, _exceptionable)) && (void 0 === input.customCSSInheritanceList || Array.isArray(input.customCSSInheritanceList) && input.customCSSInheritanceList.every((elem, _index1)=>"string" == typeof elem)) && (void 0 === input.debugInfoOutside || "boolean" == typeof input.debugInfoOutside) && (void 0 === input.defaultDisplayLinear || "boolean" == typeof input.defaultDisplayLinear) && (void 0 === input.enableAccessibilityElement || "boolean" == typeof input.enableAccessibilityElement) && (void 0 === input.enableCSSInheritance || "boolean" == typeof input.enableCSSInheritance) && (void 0 === input.enableCSSInvalidation || "boolean" == typeof input.enableCSSInvalidation) && (void 0 === input.enableCSSSelector || "boolean" == typeof input.enableCSSSelector) && (void 0 === input.enableNewGesture || "boolean" == typeof input.enableNewGesture) && (void 0 === input.enableRemoveCSSScope || "boolean" == typeof input.enableRemoveCSSScope) && (void 0 === input.firstScreenSyncTiming || "immediately" === input.firstScreenSyncTiming || "jsReady" === input.firstScreenSyncTiming) && (void 0 === input.enableSSR || "boolean" == typeof input.enableSSR) && (void 0 === input.removeDescendantSelectorScope || "boolean" == typeof input.removeDescendantSelectorScope) && (void 0 === input.shake || "object" == typeof input.shake && null !== input.shake && false === Array.isArray(input.shake) && _io4(input.shake, _exceptionable)) && (void 0 === input.defineDCE || "object" == typeof input.defineDCE && null !== input.defineDCE && false === Array.isArray(input.defineDCE) && _io5(input.defineDCE, _exceptionable)) && (void 0 === input.engineVersion || "string" == typeof input.engineVersion) && (void 0 === input.targetSdkVersion || "string" == typeof input.targetSdkVersion) && (void 0 === input.globalPropsMode || "reactive" === input.globalPropsMode || "event" === input.globalPropsMode) && null !== input.extractStr && (void 0 === input.extractStr || "boolean" == typeof input.extractStr || "object" == typeof input.extractStr && null !== input.extractStr && false === Array.isArray(input.extractStr) && _io7(input.extractStr, _exceptionable)) && (void 0 === input.experimental_isLazyBundle || "boolean" == typeof input.experimental_isLazyBundle) && (void 0 === input.experimental_useElementTemplate || "boolean" == typeof input.experimental_useElementTemplate) && null !== input.optimizeBundleSize && (void 0 === input.optimizeBundleSize || "boolean" == typeof input.optimizeBundleSize || "object" == typeof input.optimizeBundleSize && null !== input.optimizeBundleSize && false === Array.isArray(input.optimizeBundleSize) && _io8(input.optimizeBundleSize, _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
|
|
611
613
|
if ([
|
|
612
614
|
"enableUiSourceMap",
|
|
613
615
|
"compat",
|
|
@@ -630,6 +632,7 @@ const validateConfig = (()=>{
|
|
|
630
632
|
"globalPropsMode",
|
|
631
633
|
"extractStr",
|
|
632
634
|
"experimental_isLazyBundle",
|
|
635
|
+
"experimental_useElementTemplate",
|
|
633
636
|
"optimizeBundleSize"
|
|
634
637
|
].some((prop)=>key === prop)) return true;
|
|
635
638
|
const value = input[key];
|
|
@@ -850,6 +853,11 @@ const validateConfig = (()=>{
|
|
|
850
853
|
path: _path + ".experimental_isLazyBundle",
|
|
851
854
|
expected: "(boolean | undefined)",
|
|
852
855
|
value: input.experimental_isLazyBundle
|
|
856
|
+
}, _errorFactory)) && (void 0 === input.experimental_useElementTemplate || "boolean" == typeof input.experimental_useElementTemplate || _assertGuard._assertGuard(_exceptionable, {
|
|
857
|
+
method: "typia.createAssertEquals",
|
|
858
|
+
path: _path + ".experimental_useElementTemplate",
|
|
859
|
+
expected: "(boolean | undefined)",
|
|
860
|
+
value: input.experimental_useElementTemplate
|
|
853
861
|
}, _errorFactory)) && (null !== input.optimizeBundleSize || _assertGuard._assertGuard(_exceptionable, {
|
|
854
862
|
method: "typia.createAssertEquals",
|
|
855
863
|
path: _path + ".optimizeBundleSize",
|
|
@@ -888,6 +896,7 @@ const validateConfig = (()=>{
|
|
|
888
896
|
"globalPropsMode",
|
|
889
897
|
"extractStr",
|
|
890
898
|
"experimental_isLazyBundle",
|
|
899
|
+
"experimental_useElementTemplate",
|
|
891
900
|
"optimizeBundleSize"
|
|
892
901
|
].some((prop)=>key === prop)) return true;
|
|
893
902
|
const value = input[key];
|
|
@@ -1266,6 +1275,7 @@ function pluginReactLynx(userOptions) {
|
|
|
1266
1275
|
extractStr: false,
|
|
1267
1276
|
globalPropsMode: 'reactive',
|
|
1268
1277
|
experimental_isLazyBundle: false,
|
|
1278
|
+
experimental_useElementTemplate: false,
|
|
1269
1279
|
optimizeBundleSize: false,
|
|
1270
1280
|
enableUiSourceMap: false
|
|
1271
1281
|
};
|
|
@@ -1276,6 +1286,7 @@ function pluginReactLynx(userOptions) {
|
|
|
1276
1286
|
return [
|
|
1277
1287
|
pluginReactAlias({
|
|
1278
1288
|
lazy: resolvedOptions.experimental_isLazyBundle,
|
|
1289
|
+
elementTemplate: resolvedOptions.experimental_useElementTemplate,
|
|
1279
1290
|
LAYERS: LAYERS
|
|
1280
1291
|
}),
|
|
1281
1292
|
{
|
package/dist/index.d.ts
CHANGED
|
@@ -688,6 +688,13 @@ export declare interface PluginReactLynxOptions {
|
|
|
688
688
|
* @alpha
|
|
689
689
|
*/
|
|
690
690
|
experimental_isLazyBundle?: boolean;
|
|
691
|
+
/**
|
|
692
|
+
* Enable Element Template compile and runtime entries.
|
|
693
|
+
*
|
|
694
|
+
* @defaultValue `false`
|
|
695
|
+
* @experimental
|
|
696
|
+
*/
|
|
697
|
+
experimental_useElementTemplate?: boolean;
|
|
691
698
|
/**
|
|
692
699
|
* Optimize bundle size by removing unused code by Minify.mainThreadOptions and Minify.backgroundOptions.
|
|
693
700
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-rsbuild-plugin",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
4
4
|
"description": "A rsbuild plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rsbuild",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"tiny-invariant": "^1.3.3",
|
|
36
36
|
"@lynx-js/css-extract-webpack-plugin": "0.7.1",
|
|
37
|
-
"@lynx-js/react-alias-rsbuild-plugin": "0.16.
|
|
38
|
-
"@lynx-js/react-refresh-webpack-plugin": "0.3.
|
|
37
|
+
"@lynx-js/react-alias-rsbuild-plugin": "0.16.2",
|
|
38
|
+
"@lynx-js/react-refresh-webpack-plugin": "0.3.6",
|
|
39
39
|
"@lynx-js/react-webpack-plugin": "0.9.2",
|
|
40
40
|
"@lynx-js/runtime-wrapper-webpack-plugin": "0.1.3",
|
|
41
|
-
"@lynx-js/template-webpack-plugin": "0.11.
|
|
41
|
+
"@lynx-js/template-webpack-plugin": "0.11.1",
|
|
42
42
|
"@lynx-js/use-sync-external-store": "1.5.0",
|
|
43
43
|
"background-only": "^0.0.1"
|
|
44
44
|
},
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
"typia": "10.1.0",
|
|
57
57
|
"typia-rspack-plugin": "2.2.2",
|
|
58
58
|
"@lynx-js/config-rsbuild-plugin": "0.0.2",
|
|
59
|
-
"@lynx-js/react": "0.
|
|
59
|
+
"@lynx-js/react": "0.121.0",
|
|
60
60
|
"@lynx-js/react-transform": "0.2.0",
|
|
61
|
-
"@lynx-js/rspeedy": "0.14.
|
|
61
|
+
"@lynx-js/rspeedy": "0.14.4",
|
|
62
62
|
"@lynx-js/vitest-setup": "0.0.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@lynx-js/react": "^0.103.0 || ^0.104.0 || ^0.105.0 || ^0.106.0 || ^0.107.0 || ^0.108.0 || ^0.109.0 || ^0.110.0 || ^0.111.0 || ^0.112.0 || ^0.113.0 || ^0.114.0 || ^0.115.0 || ^0.116.0 || ^0.117.0 || ^0.118.0 || ^0.119.0 || ^0.120.0"
|
|
65
|
+
"@lynx-js/react": "^0.103.0 || ^0.104.0 || ^0.105.0 || ^0.106.0 || ^0.107.0 || ^0.108.0 || ^0.109.0 || ^0.110.0 || ^0.111.0 || ^0.112.0 || ^0.113.0 || ^0.114.0 || ^0.115.0 || ^0.116.0 || ^0.117.0 || ^0.118.0 || ^0.119.0 || ^0.120.0 || ^0.121.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependenciesMeta": {
|
|
68
68
|
"@lynx-js/react": {
|