@lynx-js/react-rsbuild-plugin 0.10.13 → 0.10.14
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 +18 -0
- package/dist/{860.js → 856.js} +2 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +22 -15
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @lynx-js/react-rsbuild-plugin
|
|
2
2
|
|
|
3
|
+
## 0.10.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix using wrong version of `@lynx-js/react/worklet-runtime`. ([#1711](https://github.com/lynx-family/lynx-stack/pull/1711))
|
|
8
|
+
|
|
9
|
+
- Be compat with `@lynx-js/react` v0.113.0 ([#1667](https://github.com/lynx-family/lynx-stack/pull/1667))
|
|
10
|
+
|
|
11
|
+
- Disable `builtin:lightningcss-loader` for `environments.web`. ([#1732](https://github.com/lynx-family/lynx-stack/pull/1732))
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`5ad38e6`](https://github.com/lynx-family/lynx-stack/commit/5ad38e6b3970a537f13d7f4caf0d765d16b6b322), [`69b3ae0`](https://github.com/lynx-family/lynx-stack/commit/69b3ae031a24161b8513cc804bf6b82c03da6d0c), [`69b3ae0`](https://github.com/lynx-family/lynx-stack/commit/69b3ae031a24161b8513cc804bf6b82c03da6d0c), [`c2f90bd`](https://github.com/lynx-family/lynx-stack/commit/c2f90bdb0ce465702b0b4a46108b16e78678225f)]:
|
|
14
|
+
- @lynx-js/template-webpack-plugin@0.8.6
|
|
15
|
+
- @lynx-js/react-webpack-plugin@0.7.0
|
|
16
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.10.14
|
|
17
|
+
- @lynx-js/css-extract-webpack-plugin@0.6.2
|
|
18
|
+
- @lynx-js/use-sync-external-store@1.5.0
|
|
19
|
+
- @lynx-js/react-refresh-webpack-plugin@0.3.4
|
|
20
|
+
|
|
3
21
|
## 0.10.13
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/{860.js → 856.js}
RENAMED
package/dist/index.d.ts
CHANGED
|
@@ -441,7 +441,7 @@ export declare interface PluginReactLynxOptions {
|
|
|
441
441
|
*
|
|
442
442
|
* These options should only be used for migrating from ReactLynx2.0.
|
|
443
443
|
*/
|
|
444
|
-
compat?: Partial<CompatVisitorConfig> & {
|
|
444
|
+
compat?: (Partial<CompatVisitorConfig> & {
|
|
445
445
|
/**
|
|
446
446
|
* Whether disable runtime warnings about using ReactLynx2.0-incompatible `SelectorQuery` APIs.
|
|
447
447
|
*
|
|
@@ -458,7 +458,7 @@ export declare interface PluginReactLynxOptions {
|
|
|
458
458
|
* @defaultValue `false`
|
|
459
459
|
*/
|
|
460
460
|
disableCreateSelectorQueryIncompatibleWarning?: boolean;
|
|
461
|
-
} | undefined;
|
|
461
|
+
}) | undefined;
|
|
462
462
|
/**
|
|
463
463
|
* When {@link PluginReactLynxOptions.enableCSSInheritance} is enabled, `customCSSInheritanceList` can control which properties are inheritable, not just the default ones.
|
|
464
464
|
*
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { RuntimeWrapperWebpackPlugin } from "@lynx-js/runtime-wrapper-webpack-pl
|
|
|
7
7
|
import { LynxEncodePlugin, LynxTemplatePlugin, WebEncodePlugin } from "@lynx-js/template-webpack-plugin";
|
|
8
8
|
import { ReactRefreshRspackPlugin, ReactRefreshWebpackPlugin } from "@lynx-js/react-refresh-webpack-plugin";
|
|
9
9
|
var __webpack_modules__ = {
|
|
10
|
-
"../../../node_modules/.pnpm/typia@9.7.
|
|
10
|
+
"../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/internal/_accessExpressionAsString.js": function(__unused_webpack_module, exports) {
|
|
11
11
|
exports._accessExpressionAsString = void 0;
|
|
12
12
|
const _accessExpressionAsString = (str)=>variable(str) ? `.${str}` : `[${JSON.stringify(str)}]`;
|
|
13
13
|
exports._accessExpressionAsString = _accessExpressionAsString;
|
|
@@ -52,9 +52,9 @@ var __webpack_modules__ = {
|
|
|
52
52
|
"with"
|
|
53
53
|
]);
|
|
54
54
|
},
|
|
55
|
-
"../../../node_modules/.pnpm/typia@9.7.
|
|
55
|
+
"../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/internal/_assertGuard.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
56
56
|
exports._assertGuard = void 0;
|
|
57
|
-
const TypeGuardError_1 = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.
|
|
57
|
+
const TypeGuardError_1 = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/TypeGuardError.mjs");
|
|
58
58
|
const _assertGuard = (exceptionable, props, factory)=>{
|
|
59
59
|
if (true === exceptionable) if (factory) throw factory(props);
|
|
60
60
|
else throw new TypeGuardError_1.TypeGuardError(props);
|
|
@@ -71,7 +71,7 @@ var __webpack_modules__ = {
|
|
|
71
71
|
"node:url": function(module) {
|
|
72
72
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__;
|
|
73
73
|
},
|
|
74
|
-
"../../../node_modules/.pnpm/typia@9.7.
|
|
74
|
+
"../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/TypeGuardError.mjs": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
75
75
|
__webpack_require__.r(__webpack_exports__);
|
|
76
76
|
__webpack_require__.d(__webpack_exports__, {
|
|
77
77
|
TypeGuardError: ()=>TypeGuardError
|
|
@@ -81,6 +81,7 @@ var __webpack_modules__ = {
|
|
|
81
81
|
path;
|
|
82
82
|
expected;
|
|
83
83
|
value;
|
|
84
|
+
description;
|
|
84
85
|
fake_expected_typed_value_;
|
|
85
86
|
constructor(props){
|
|
86
87
|
super(props.message || `Error on ${props.method}(): invalid type${props.path ? ` on ${props.path}` : ""}, expect to be ${props.expected}`);
|
|
@@ -91,6 +92,11 @@ var __webpack_modules__ = {
|
|
|
91
92
|
this.path = props.path;
|
|
92
93
|
this.expected = props.expected;
|
|
93
94
|
this.value = props.value;
|
|
95
|
+
if (props.description || void 0 === props.value) this.description = props.description ?? [
|
|
96
|
+
"The value at this path is `undefined`.",
|
|
97
|
+
"",
|
|
98
|
+
`Please fill the \`${props.expected}\` typed value next time.`
|
|
99
|
+
].join("\n");
|
|
94
100
|
}
|
|
95
101
|
}
|
|
96
102
|
}
|
|
@@ -139,7 +145,7 @@ __webpack_require__.m = __webpack_modules__;
|
|
|
139
145
|
})();
|
|
140
146
|
(()=>{
|
|
141
147
|
var installedChunks = {
|
|
142
|
-
|
|
148
|
+
410: 0
|
|
143
149
|
};
|
|
144
150
|
var installChunk = (data)=>{
|
|
145
151
|
var __webpack_ids__ = data.__webpack_ids__;
|
|
@@ -183,7 +189,7 @@ const ALIAS_BACKGROUND_ONLY_BACKGROUND = 'react:alias-background-only-background
|
|
|
183
189
|
function applyBackgroundOnly(api) {
|
|
184
190
|
api.modifyBundlerChain(async (chain)=>{
|
|
185
191
|
const __dirname = external_node_path_["default"].dirname((0, external_node_url_.fileURLToPath)(import.meta.url));
|
|
186
|
-
const { resolve, resolveMainThread } = await __webpack_require__.e("
|
|
192
|
+
const { resolve, resolveMainThread } = await __webpack_require__.e("856").then(__webpack_require__.bind(__webpack_require__, "./src/resolve.ts"));
|
|
187
193
|
const [backgroundOnly, backgroundOnlyMainThread] = await Promise.all([
|
|
188
194
|
resolve('background-only'),
|
|
189
195
|
resolveMainThread('background-only')
|
|
@@ -203,7 +209,7 @@ function applyCSS(api, options) {
|
|
|
203
209
|
}
|
|
204
210
|
}));
|
|
205
211
|
const __dirname = external_node_path_["default"].dirname((0, external_node_url_.fileURLToPath)(import.meta.url));
|
|
206
|
-
api.modifyBundlerChain(async function(chain, { CHAIN_ID
|
|
212
|
+
api.modifyBundlerChain(async function(chain, { CHAIN_ID }) {
|
|
207
213
|
const { CssExtractRspackPlugin, CssExtractWebpackPlugin } = await import("@lynx-js/css-extract-webpack-plugin");
|
|
208
214
|
const CssExtractPlugin = 'rspack' === api.context.bundlerType ? CssExtractRspackPlugin : CssExtractWebpackPlugin;
|
|
209
215
|
const cssRules = [
|
|
@@ -232,7 +238,7 @@ function applyCSS(api, options) {
|
|
|
232
238
|
removeLightningCSS(rule);
|
|
233
239
|
});
|
|
234
240
|
function removeLightningCSS(rule) {
|
|
235
|
-
if (rule.uses.has(CHAIN_ID.USE.LIGHTNINGCSS)
|
|
241
|
+
if (rule.uses.has(CHAIN_ID.USE.LIGHTNINGCSS)) rule.uses.delete(CHAIN_ID.USE.LIGHTNINGCSS);
|
|
236
242
|
}
|
|
237
243
|
chain.plugin(CHAIN_ID.PLUGIN.MINI_CSS_EXTRACT).tap(([options])=>[
|
|
238
244
|
{
|
|
@@ -280,7 +286,7 @@ const EMPTY_HASH = '';
|
|
|
280
286
|
function applyEntry(api, options) {
|
|
281
287
|
const { compat, customCSSInheritanceList, debugInfoOutside, defaultDisplayLinear, enableAccessibilityElement, enableICU, enableCSSInheritance, enableCSSInvalidation, enableCSSSelector, enableNewGesture, enableParallelElement, enableRemoveCSSScope, firstScreenSyncTiming, enableSSR, pipelineSchedulerConfig, removeDescendantSelectorScope, targetSdkVersion, extractStr: originalExtractStr, experimental_isLazyBundle } = options;
|
|
282
288
|
const { config, logger } = api.useExposed(Symbol.for('rspeedy.api'));
|
|
283
|
-
api.modifyBundlerChain((chain, { environment, isDev, isProd })=>{
|
|
289
|
+
api.modifyBundlerChain(async (chain, { environment, isDev, isProd })=>{
|
|
284
290
|
const entries = chain.entryPoints.entries() ?? {};
|
|
285
291
|
const isLynx = 'lynx' === environment.name;
|
|
286
292
|
const isWeb = 'web' === environment.name;
|
|
@@ -384,6 +390,7 @@ function applyEntry(api, options) {
|
|
|
384
390
|
logger.warn('`extractStr` is changed to `false` because it is only supported in `all-in-one` chunkSplit strategy, please set `performance.chunkSplit.strategy` to `all-in-one` to use `extractStr.`');
|
|
385
391
|
extractStr = false;
|
|
386
392
|
}
|
|
393
|
+
const { resolve } = api.useExposed(Symbol.for('@lynx-js/react/internal:resolve'));
|
|
387
394
|
chain.plugin(PLUGIN_NAME_REACT).after(PLUGIN_NAME_TEMPLATE).use(ReactWebpackPlugin, [
|
|
388
395
|
{
|
|
389
396
|
disableCreateSelectorQueryIncompatibleWarning: compat?.disableCreateSelectorQueryIncompatibleWarning ?? false,
|
|
@@ -392,7 +399,8 @@ function applyEntry(api, options) {
|
|
|
392
399
|
mainThreadChunks,
|
|
393
400
|
extractStr,
|
|
394
401
|
experimental_isLazyBundle,
|
|
395
|
-
profile: getDefaultProfile()
|
|
402
|
+
profile: getDefaultProfile(),
|
|
403
|
+
workletRuntimePath: await resolve(`@lynx-js/react/${isDev ? 'worklet-dev-runtime' : 'worklet-runtime'}`)
|
|
396
404
|
}
|
|
397
405
|
]);
|
|
398
406
|
function getDefaultProfile() {
|
|
@@ -554,8 +562,7 @@ const applySplitChunksRule = (api)=>{
|
|
|
554
562
|
}
|
|
555
563
|
});
|
|
556
564
|
});
|
|
557
|
-
api.modifyRspackConfig((rspackConfig
|
|
558
|
-
if ('lynx' !== environment.name) return rspackConfig;
|
|
565
|
+
api.modifyRspackConfig((rspackConfig)=>{
|
|
559
566
|
if (!rspackConfig.optimization) return rspackConfig;
|
|
560
567
|
if (!rspackConfig.optimization.splitChunks) return rspackConfig;
|
|
561
568
|
rspackConfig.optimization.splitChunks.chunks = function(chunk) {
|
|
@@ -587,7 +594,7 @@ function applySWC(api) {
|
|
|
587
594
|
}
|
|
588
595
|
function applyUseSyncExternalStore(api) {
|
|
589
596
|
api.modifyBundlerChain(async (chain)=>{
|
|
590
|
-
const { resolve } = await __webpack_require__.e("
|
|
597
|
+
const { resolve } = await __webpack_require__.e("856").then(__webpack_require__.bind(__webpack_require__, "./src/resolve.ts"));
|
|
591
598
|
const useSyncExternalStoreEntries = [
|
|
592
599
|
'use-sync-external-store',
|
|
593
600
|
'use-sync-external-store/with-selector',
|
|
@@ -599,8 +606,8 @@ function applyUseSyncExternalStore(api) {
|
|
|
599
606
|
})));
|
|
600
607
|
});
|
|
601
608
|
}
|
|
602
|
-
var _accessExpressionAsString = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.
|
|
603
|
-
var _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.
|
|
609
|
+
var _accessExpressionAsString = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/internal/_accessExpressionAsString.js");
|
|
610
|
+
var _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/internal/_assertGuard.js");
|
|
604
611
|
const validateConfig = (()=>{
|
|
605
612
|
const _io0 = (input, _exceptionable = true)=>(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.enableICU || "boolean" == typeof input.enableICU) && (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.enableParallelElement || "boolean" == typeof input.enableParallelElement) && (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.pipelineSchedulerConfig || "number" == typeof input.pipelineSchedulerConfig) && (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) && 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) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
|
|
606
613
|
if ([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-rsbuild-plugin",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.14",
|
|
4
4
|
"description": "A rsbuild plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rsbuild",
|
|
@@ -33,33 +33,33 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@lynx-js/css-extract-webpack-plugin": "0.6.2",
|
|
36
|
-
"@lynx-js/react-alias-rsbuild-plugin": "0.10.
|
|
36
|
+
"@lynx-js/react-alias-rsbuild-plugin": "0.10.14",
|
|
37
37
|
"@lynx-js/react-refresh-webpack-plugin": "0.3.4",
|
|
38
|
-
"@lynx-js/react-webpack-plugin": "0.
|
|
38
|
+
"@lynx-js/react-webpack-plugin": "0.7.0",
|
|
39
39
|
"@lynx-js/runtime-wrapper-webpack-plugin": "0.1.3",
|
|
40
|
-
"@lynx-js/template-webpack-plugin": "0.8.
|
|
40
|
+
"@lynx-js/template-webpack-plugin": "0.8.6",
|
|
41
41
|
"@lynx-js/use-sync-external-store": "1.5.0",
|
|
42
42
|
"background-only": "^0.0.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@microsoft/api-extractor": "7.52.11",
|
|
46
46
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
47
|
-
"@rsbuild/core": "1.4
|
|
48
|
-
"@rsbuild/plugin-sass": "1.
|
|
49
|
-
"@rsbuild/plugin-typed-css-modules": "1.0
|
|
47
|
+
"@rsbuild/core": "1.5.4",
|
|
48
|
+
"@rsbuild/plugin-sass": "1.4.0",
|
|
49
|
+
"@rsbuild/plugin-typed-css-modules": "1.1.0",
|
|
50
50
|
"rsbuild-plugin-arethetypeswrong": "0.1.1",
|
|
51
51
|
"rsbuild-plugin-publint": "0.3.3",
|
|
52
52
|
"tailwindcss": "^3.4.17",
|
|
53
53
|
"type-fest": "^4.41.0",
|
|
54
|
-
"typia": "9.7.
|
|
55
|
-
"typia-rspack-plugin": "2.2.
|
|
56
|
-
"@lynx-js/react": "0.
|
|
54
|
+
"typia": "9.7.2",
|
|
55
|
+
"typia-rspack-plugin": "2.2.2",
|
|
56
|
+
"@lynx-js/react": "0.113.0",
|
|
57
57
|
"@lynx-js/react-transform": "0.2.0",
|
|
58
|
-
"@lynx-js/rspeedy": "0.
|
|
58
|
+
"@lynx-js/rspeedy": "0.11.2",
|
|
59
59
|
"@lynx-js/vitest-setup": "0.0.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@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"
|
|
62
|
+
"@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"
|
|
63
63
|
},
|
|
64
64
|
"peerDependenciesMeta": {
|
|
65
65
|
"@lynx-js/react": {
|