@lynx-js/react-rsbuild-plugin 0.11.4 → 0.12.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 +18 -0
- package/dist/300.js +34 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -20
- package/package.json +8 -8
- package/dist/856.js +0 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @lynx-js/react-rsbuild-plugin
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **BREAKING CHANGE**: Require `@lynx-js/rspeedy` 0.12.0. ([#1951](https://github.com/lynx-family/lynx-stack/pull/1951))
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Support Yarn Plug'n'Play. ([#1964](https://github.com/lynx-family/lynx-stack/pull/1964))
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`738d44d`](https://github.com/lynx-family/lynx-stack/commit/738d44d685870d7c3f64a1be7139e8d7af498feb), [`5bbb439`](https://github.com/lynx-family/lynx-stack/commit/5bbb43981580f917f59819cd4ff7972b9737a341), [`3692a16`](https://github.com/lynx-family/lynx-stack/commit/3692a169ae443124de0e9f7a288318f5dfba13b0), [`d2e290b`](https://github.com/lynx-family/lynx-stack/commit/d2e290b67971ead5bedbcc1e34dd7f3bf4a6f5f3), [`738d44d`](https://github.com/lynx-family/lynx-stack/commit/738d44d685870d7c3f64a1be7139e8d7af498feb)]:
|
|
14
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.12.0
|
|
15
|
+
- @lynx-js/css-extract-webpack-plugin@0.6.5
|
|
16
|
+
- @lynx-js/template-webpack-plugin@0.9.2
|
|
17
|
+
- @lynx-js/use-sync-external-store@1.5.0
|
|
18
|
+
- @lynx-js/react-refresh-webpack-plugin@0.3.4
|
|
19
|
+
- @lynx-js/react-webpack-plugin@0.7.2
|
|
20
|
+
|
|
3
21
|
## 0.11.4
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/300.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const __webpack_id__ = "300";
|
|
2
|
+
export const __webpack_ids__ = [
|
|
3
|
+
"300"
|
|
4
|
+
];
|
|
5
|
+
export const __webpack_modules__ = {
|
|
6
|
+
"./src/resolve.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
8
|
+
getImportResolver: ()=>getImportResolver,
|
|
9
|
+
getMainThreadResolver: ()=>getMainThreadResolver
|
|
10
|
+
});
|
|
11
|
+
var node_path__rspack_import_0 = __webpack_require__("node:path");
|
|
12
|
+
var node_url__rspack_import_1 = __webpack_require__("node:url");
|
|
13
|
+
var _lynx_js_react_alias_rsbuild_plugin__rspack_import_2 = __webpack_require__("@lynx-js/react-alias-rsbuild-plugin");
|
|
14
|
+
const __dirname = node_path__rspack_import_0["default"].dirname((0, node_url__rspack_import_1.fileURLToPath)(import.meta.url));
|
|
15
|
+
const getImportResolver = (()=>{
|
|
16
|
+
let resolver = null;
|
|
17
|
+
return (rspack)=>{
|
|
18
|
+
resolver ??= (0, _lynx_js_react_alias_rsbuild_plugin__rspack_import_2.createLazyResolver)(rspack, __dirname, [
|
|
19
|
+
'import'
|
|
20
|
+
]);
|
|
21
|
+
return resolver;
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
const getMainThreadResolver = (()=>{
|
|
25
|
+
let resolver = null;
|
|
26
|
+
return (rspack)=>{
|
|
27
|
+
resolver ??= (0, _lynx_js_react_alias_rsbuild_plugin__rspack_import_2.createLazyResolver)(rspack, __dirname, [
|
|
28
|
+
'lepus'
|
|
29
|
+
]);
|
|
30
|
+
return resolver;
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
}
|
|
34
|
+
};
|
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?:
|
|
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
|
-
}
|
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
1
|
+
import * as __rspack_external__lynx_js_react_alias_rsbuild_plugin_2a0391db from "@lynx-js/react-alias-rsbuild-plugin";
|
|
2
|
+
import * as __rspack_external_node_path_c5b9b54f from "node:path";
|
|
3
|
+
import * as __rspack_external_node_url_e96de089 from "node:url";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { LAYERS, ReactWebpackPlugin } from "@lynx-js/react-webpack-plugin";
|
|
6
6
|
import { RuntimeWrapperWebpackPlugin } from "@lynx-js/runtime-wrapper-webpack-plugin";
|
|
@@ -63,13 +63,13 @@ var __webpack_modules__ = {
|
|
|
63
63
|
exports._assertGuard = _assertGuard;
|
|
64
64
|
},
|
|
65
65
|
"@lynx-js/react-alias-rsbuild-plugin": function(module) {
|
|
66
|
-
module.exports =
|
|
66
|
+
module.exports = __rspack_external__lynx_js_react_alias_rsbuild_plugin_2a0391db;
|
|
67
67
|
},
|
|
68
68
|
"node:path": function(module) {
|
|
69
|
-
module.exports =
|
|
69
|
+
module.exports = __rspack_external_node_path_c5b9b54f;
|
|
70
70
|
},
|
|
71
71
|
"node:url": function(module) {
|
|
72
|
-
module.exports =
|
|
72
|
+
module.exports = __rspack_external_node_url_e96de089;
|
|
73
73
|
},
|
|
74
74
|
"../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.3/node_modules/typia/lib/TypeGuardError.mjs": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
75
75
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -187,9 +187,11 @@ const DETECT_IMPORT_ERROR = 'react:detect-import-error';
|
|
|
187
187
|
const ALIAS_BACKGROUND_ONLY_MAIN = 'react:alias-background-only-main';
|
|
188
188
|
const ALIAS_BACKGROUND_ONLY_BACKGROUND = 'react:alias-background-only-background';
|
|
189
189
|
function applyBackgroundOnly(api) {
|
|
190
|
-
api.modifyBundlerChain(async (chain)=>{
|
|
190
|
+
api.modifyBundlerChain(async (chain, { rspack })=>{
|
|
191
191
|
const __dirname = external_node_path_["default"].dirname((0, external_node_url_.fileURLToPath)(import.meta.url));
|
|
192
|
-
const {
|
|
192
|
+
const { getImportResolver, getMainThreadResolver } = await __webpack_require__.e("300").then(__webpack_require__.bind(__webpack_require__, "./src/resolve.ts"));
|
|
193
|
+
const resolve = getImportResolver(rspack);
|
|
194
|
+
const resolveMainThread = getMainThreadResolver(rspack);
|
|
193
195
|
const [backgroundOnly, backgroundOnlyMainThread] = await Promise.all([
|
|
194
196
|
resolve('background-only'),
|
|
195
197
|
resolveMainThread('background-only')
|
|
@@ -471,11 +473,6 @@ function applyLazy(api) {
|
|
|
471
473
|
function applyLoaders(api, options) {
|
|
472
474
|
const { compat, enableRemoveCSSScope, shake, defineDCE, engineVersion, experimental_isLazyBundle } = options;
|
|
473
475
|
api.modifyBundlerChain((chain, { CHAIN_ID })=>{
|
|
474
|
-
const experiments = chain.get('experiments');
|
|
475
|
-
chain.experiments({
|
|
476
|
-
...experiments,
|
|
477
|
-
layers: true
|
|
478
|
-
});
|
|
479
476
|
const rule = chain.module.rules.get(CHAIN_ID.RULE.JS);
|
|
480
477
|
const uses = rule.uses.entries() ?? {};
|
|
481
478
|
const { output } = api.getRsbuildConfig();
|
|
@@ -602,8 +599,9 @@ function applySWC(api) {
|
|
|
602
599
|
}, config));
|
|
603
600
|
}
|
|
604
601
|
function applyUseSyncExternalStore(api) {
|
|
605
|
-
api.modifyBundlerChain(async (chain)=>{
|
|
606
|
-
const {
|
|
602
|
+
api.modifyBundlerChain(async (chain, { rspack })=>{
|
|
603
|
+
const { getImportResolver } = await __webpack_require__.e("300").then(__webpack_require__.bind(__webpack_require__, "./src/resolve.ts"));
|
|
604
|
+
const resolve = getImportResolver(rspack);
|
|
607
605
|
const useSyncExternalStoreEntries = [
|
|
608
606
|
'use-sync-external-store',
|
|
609
607
|
'use-sync-external-store/with-selector',
|
|
@@ -1229,11 +1227,6 @@ function pluginReactLynx(userOptions) {
|
|
|
1229
1227
|
]
|
|
1230
1228
|
}
|
|
1231
1229
|
});
|
|
1232
|
-
if (void 0 === userConfig.output?.inlineScripts) config = mergeRsbuildConfig(config, {
|
|
1233
|
-
output: {
|
|
1234
|
-
inlineScripts: true
|
|
1235
|
-
}
|
|
1236
|
-
});
|
|
1237
1230
|
config = mergeRsbuildConfig({
|
|
1238
1231
|
tools: {
|
|
1239
1232
|
rspack: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-rsbuild-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "A rsbuild plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rsbuild",
|
|
@@ -32,19 +32,19 @@
|
|
|
32
32
|
"README.md"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@lynx-js/css-extract-webpack-plugin": "0.6.
|
|
36
|
-
"@lynx-js/react-alias-rsbuild-plugin": "0.
|
|
35
|
+
"@lynx-js/css-extract-webpack-plugin": "0.6.5",
|
|
36
|
+
"@lynx-js/react-alias-rsbuild-plugin": "0.12.0",
|
|
37
37
|
"@lynx-js/react-refresh-webpack-plugin": "0.3.4",
|
|
38
38
|
"@lynx-js/react-webpack-plugin": "0.7.2",
|
|
39
39
|
"@lynx-js/runtime-wrapper-webpack-plugin": "0.1.3",
|
|
40
|
-
"@lynx-js/template-webpack-plugin": "0.9.
|
|
40
|
+
"@lynx-js/template-webpack-plugin": "0.9.2",
|
|
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.15",
|
|
46
46
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
47
|
-
"@rsbuild/core": "1.
|
|
47
|
+
"@rsbuild/core": "1.6.9",
|
|
48
48
|
"@rsbuild/plugin-sass": "1.4.0",
|
|
49
49
|
"@rsbuild/plugin-typed-css-modules": "1.1.1",
|
|
50
50
|
"rsbuild-plugin-arethetypeswrong": "0.1.1",
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
"type-fest": "^5.0.1",
|
|
55
55
|
"typia": "9.7.2",
|
|
56
56
|
"typia-rspack-plugin": "2.2.2",
|
|
57
|
-
"@lynx-js/react": "0.
|
|
57
|
+
"@lynx-js/react": "0.115.0",
|
|
58
58
|
"@lynx-js/react-transform": "0.2.0",
|
|
59
|
-
"@lynx-js/rspeedy": "0.
|
|
59
|
+
"@lynx-js/rspeedy": "0.12.1",
|
|
60
60
|
"@lynx-js/vitest-setup": "0.0.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@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"
|
|
63
|
+
"@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"
|
|
64
64
|
},
|
|
65
65
|
"peerDependenciesMeta": {
|
|
66
66
|
"@lynx-js/react": {
|
package/dist/856.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export const __webpack_id__ = "856";
|
|
2
|
-
export const __webpack_ids__ = [
|
|
3
|
-
"856"
|
|
4
|
-
];
|
|
5
|
-
export const __webpack_modules__ = {
|
|
6
|
-
"./src/resolve.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
8
|
-
resolve: ()=>resolve,
|
|
9
|
-
resolveMainThread: ()=>resolveMainThread
|
|
10
|
-
});
|
|
11
|
-
var node_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("node:path");
|
|
12
|
-
var node_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("node:url");
|
|
13
|
-
var _lynx_js_react_alias_rsbuild_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("@lynx-js/react-alias-rsbuild-plugin");
|
|
14
|
-
const __dirname = node_path__WEBPACK_IMPORTED_MODULE_0__["default"].dirname((0, node_url__WEBPACK_IMPORTED_MODULE_1__.fileURLToPath)(import.meta.url));
|
|
15
|
-
const resolve = (0, _lynx_js_react_alias_rsbuild_plugin__WEBPACK_IMPORTED_MODULE_2__.createLazyResolver)(__dirname, [
|
|
16
|
-
'import'
|
|
17
|
-
]);
|
|
18
|
-
const resolveMainThread = (0, _lynx_js_react_alias_rsbuild_plugin__WEBPACK_IMPORTED_MODULE_2__.createLazyResolver)(__dirname, [
|
|
19
|
-
'lepus'
|
|
20
|
-
]);
|
|
21
|
-
}
|
|
22
|
-
};
|