@lynx-js/react-rsbuild-plugin 0.12.0 → 0.12.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 +23 -0
- package/dist/300.js +3 -3
- package/dist/index.js +27 -22
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @lynx-js/react-rsbuild-plugin
|
|
2
2
|
|
|
3
|
+
## 0.12.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Support environment variants to enable multiple configurations for the same targets. ([#1969](https://github.com/lynx-family/lynx-stack/pull/1969))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.12.2
|
|
11
|
+
|
|
12
|
+
## 0.12.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Avoid injecting hot update runtime when dev.hmr or dev.liveReload is set to false. ([#1980](https://github.com/lynx-family/lynx-stack/pull/1980))
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`553ece1`](https://github.com/lynx-family/lynx-stack/commit/553ece1e025b1f4feae353310c21b2e159f1f03a), [`8cdb69d`](https://github.com/lynx-family/lynx-stack/commit/8cdb69d4b2cc3e9925a2494ee8a889d7af17e2e9), [`8cdb69d`](https://github.com/lynx-family/lynx-stack/commit/8cdb69d4b2cc3e9925a2494ee8a889d7af17e2e9)]:
|
|
19
|
+
- @lynx-js/react-webpack-plugin@0.7.3
|
|
20
|
+
- @lynx-js/css-extract-webpack-plugin@0.7.0
|
|
21
|
+
- @lynx-js/template-webpack-plugin@0.10.0
|
|
22
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.12.1
|
|
23
|
+
- @lynx-js/use-sync-external-store@1.5.0
|
|
24
|
+
- @lynx-js/react-refresh-webpack-plugin@0.3.4
|
|
25
|
+
|
|
3
26
|
## 0.12.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/dist/300.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export const
|
|
2
|
-
export const
|
|
1
|
+
export const __rspack_esm_id = "300";
|
|
2
|
+
export const __rspack_esm_ids = [
|
|
3
3
|
"300"
|
|
4
4
|
];
|
|
5
5
|
export const __webpack_modules__ = {
|
|
6
|
-
"./src/resolve.ts"
|
|
6
|
+
"./src/resolve.ts" (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
7
|
__webpack_require__.d(__webpack_exports__, {
|
|
8
8
|
getImportResolver: ()=>getImportResolver,
|
|
9
9
|
getMainThreadResolver: ()=>getMainThreadResolver
|
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@
|
|
10
|
+
"../../../node_modules/.pnpm/typia@10.1.0_typescript@5.9.3/node_modules/typia/lib/internal/_accessExpressionAsString.js" (__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@
|
|
55
|
+
"../../../node_modules/.pnpm/typia@10.1.0_typescript@5.9.3/node_modules/typia/lib/internal/_assertGuard.js" (__unused_webpack_module, exports, __webpack_require__) {
|
|
56
56
|
exports._assertGuard = void 0;
|
|
57
|
-
const TypeGuardError_1 = __webpack_require__("../../../node_modules/.pnpm/typia@
|
|
57
|
+
const TypeGuardError_1 = __webpack_require__("../../../node_modules/.pnpm/typia@10.1.0_typescript@5.9.3/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);
|
|
@@ -62,16 +62,16 @@ var __webpack_modules__ = {
|
|
|
62
62
|
};
|
|
63
63
|
exports._assertGuard = _assertGuard;
|
|
64
64
|
},
|
|
65
|
-
"@lynx-js/react-alias-rsbuild-plugin"
|
|
65
|
+
"@lynx-js/react-alias-rsbuild-plugin" (module) {
|
|
66
66
|
module.exports = __rspack_external__lynx_js_react_alias_rsbuild_plugin_2a0391db;
|
|
67
67
|
},
|
|
68
|
-
"node:path"
|
|
68
|
+
"node:path" (module) {
|
|
69
69
|
module.exports = __rspack_external_node_path_c5b9b54f;
|
|
70
70
|
},
|
|
71
|
-
"node:url"
|
|
71
|
+
"node:url" (module) {
|
|
72
72
|
module.exports = __rspack_external_node_url_e96de089;
|
|
73
73
|
},
|
|
74
|
-
"../../../node_modules/.pnpm/typia@
|
|
74
|
+
"../../../node_modules/.pnpm/typia@10.1.0_typescript@5.9.3/node_modules/typia/lib/TypeGuardError.mjs" (__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
|
|
@@ -148,16 +148,16 @@ __webpack_require__.m = __webpack_modules__;
|
|
|
148
148
|
410: 0
|
|
149
149
|
};
|
|
150
150
|
var installChunk = (data)=>{
|
|
151
|
-
var
|
|
151
|
+
var __rspack_esm_ids = data.__rspack_esm_ids;
|
|
152
152
|
var __webpack_modules__ = data.__webpack_modules__;
|
|
153
|
-
var
|
|
153
|
+
var __rspack_esm_runtime = data.__rspack_esm_runtime;
|
|
154
154
|
var moduleId, chunkId, i = 0;
|
|
155
155
|
for(moduleId in __webpack_modules__)if (__webpack_require__.o(__webpack_modules__, moduleId)) __webpack_require__.m[moduleId] = __webpack_modules__[moduleId];
|
|
156
|
-
if (
|
|
157
|
-
for(; i <
|
|
158
|
-
chunkId =
|
|
156
|
+
if (__rspack_esm_runtime) __rspack_esm_runtime(__webpack_require__);
|
|
157
|
+
for(; i < __rspack_esm_ids.length; i++){
|
|
158
|
+
chunkId = __rspack_esm_ids[i];
|
|
159
159
|
if (__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) installedChunks[chunkId][0]();
|
|
160
|
-
installedChunks[
|
|
160
|
+
installedChunks[__rspack_esm_ids[i]] = 0;
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
163
|
__webpack_require__.f.j = function(chunkId, promises) {
|
|
@@ -290,8 +290,11 @@ function applyEntry(api, options) {
|
|
|
290
290
|
const { config, logger } = api.useExposed(Symbol.for('rspeedy.api'));
|
|
291
291
|
api.modifyBundlerChain(async (chain, { environment, isDev, isProd })=>{
|
|
292
292
|
const entries = chain.entryPoints.entries() ?? {};
|
|
293
|
-
const isLynx = 'lynx' === environment.name;
|
|
294
|
-
const isWeb = 'web' === environment.name;
|
|
293
|
+
const isLynx = 'lynx' === environment.name || environment.name.startsWith('lynx-');
|
|
294
|
+
const isWeb = 'web' === environment.name || environment.name.startsWith('web-');
|
|
295
|
+
const { hmr, liveReload } = environment.config.dev ?? {};
|
|
296
|
+
const enabledHMR = isDev && !isWeb && false !== hmr;
|
|
297
|
+
const enabledLiveReload = isDev && !isWeb && false !== liveReload;
|
|
295
298
|
chain.entryPoints.clear();
|
|
296
299
|
const mainThreadChunks = [];
|
|
297
300
|
Object.entries(entries).forEach(([entryName, entryPoint])=>{
|
|
@@ -306,7 +309,7 @@ function applyEntry(api, options) {
|
|
|
306
309
|
layer: LAYERS.MAIN_THREAD,
|
|
307
310
|
import: imports,
|
|
308
311
|
filename: mainThreadName
|
|
309
|
-
}).when(
|
|
312
|
+
}).when(enabledHMR, (entry)=>{
|
|
310
313
|
const require = createRequire(import.meta.url);
|
|
311
314
|
entry.prepend({
|
|
312
315
|
layer: LAYERS.MAIN_THREAD,
|
|
@@ -316,17 +319,19 @@ function applyEntry(api, options) {
|
|
|
316
319
|
layer: LAYERS.BACKGROUND,
|
|
317
320
|
import: imports,
|
|
318
321
|
filename: backgroundName
|
|
319
|
-
}).when(
|
|
322
|
+
}).when(enabledHMR, (entry)=>{
|
|
320
323
|
entry.prepend({
|
|
321
324
|
layer: LAYERS.BACKGROUND,
|
|
322
325
|
import: '@rspack/core/hot/dev-server'
|
|
323
|
-
}).prepend({
|
|
324
|
-
layer: LAYERS.BACKGROUND,
|
|
325
|
-
import: '@lynx-js/webpack-dev-transport/client'
|
|
326
326
|
}).prepend({
|
|
327
327
|
layer: LAYERS.BACKGROUND,
|
|
328
328
|
import: '@lynx-js/react/refresh'
|
|
329
329
|
});
|
|
330
|
+
}).when(enabledHMR || enabledLiveReload, (entry)=>{
|
|
331
|
+
entry.prepend({
|
|
332
|
+
layer: LAYERS.BACKGROUND,
|
|
333
|
+
import: '@lynx-js/webpack-dev-transport/client'
|
|
334
|
+
});
|
|
330
335
|
}).end().plugin(`${PLUGIN_NAME_TEMPLATE}-${entryName}`).use(LynxTemplatePlugin, [
|
|
331
336
|
{
|
|
332
337
|
dsl: 'react_nodiff',
|
|
@@ -613,8 +618,8 @@ function applyUseSyncExternalStore(api) {
|
|
|
613
618
|
})));
|
|
614
619
|
});
|
|
615
620
|
}
|
|
616
|
-
var _accessExpressionAsString = __webpack_require__("../../../node_modules/.pnpm/typia@
|
|
617
|
-
var _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@
|
|
621
|
+
var _accessExpressionAsString = __webpack_require__("../../../node_modules/.pnpm/typia@10.1.0_typescript@5.9.3/node_modules/typia/lib/internal/_accessExpressionAsString.js");
|
|
622
|
+
var _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@10.1.0_typescript@5.9.3/node_modules/typia/lib/internal/_assertGuard.js");
|
|
618
623
|
const validateConfig = (()=>{
|
|
619
624
|
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.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) && 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)=>{
|
|
620
625
|
if ([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-rsbuild-plugin",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "A rsbuild plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rsbuild",
|
|
@@ -32,31 +32,31 @@
|
|
|
32
32
|
"README.md"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@lynx-js/css-extract-webpack-plugin": "0.
|
|
36
|
-
"@lynx-js/react-alias-rsbuild-plugin": "0.12.
|
|
35
|
+
"@lynx-js/css-extract-webpack-plugin": "0.7.0",
|
|
36
|
+
"@lynx-js/react-alias-rsbuild-plugin": "0.12.2",
|
|
37
37
|
"@lynx-js/react-refresh-webpack-plugin": "0.3.4",
|
|
38
|
-
"@lynx-js/react-webpack-plugin": "0.7.
|
|
38
|
+
"@lynx-js/react-webpack-plugin": "0.7.3",
|
|
39
39
|
"@lynx-js/runtime-wrapper-webpack-plugin": "0.1.3",
|
|
40
|
-
"@lynx-js/template-webpack-plugin": "0.
|
|
40
|
+
"@lynx-js/template-webpack-plugin": "0.10.0",
|
|
41
41
|
"@lynx-js/use-sync-external-store": "1.5.0",
|
|
42
42
|
"background-only": "^0.0.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@microsoft/api-extractor": "7.
|
|
46
|
-
"@rollup/plugin-typescript": "^12.
|
|
47
|
-
"@rsbuild/core": "1.6.
|
|
45
|
+
"@microsoft/api-extractor": "7.55.2",
|
|
46
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
47
|
+
"@rsbuild/core": "1.6.13",
|
|
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",
|
|
51
51
|
"rsbuild-plugin-publint": "0.3.3",
|
|
52
52
|
"source-map": "^0.7.6",
|
|
53
|
-
"tailwindcss": "^3.4.
|
|
53
|
+
"tailwindcss": "^3.4.19",
|
|
54
54
|
"type-fest": "^5.0.1",
|
|
55
|
-
"typia": "
|
|
55
|
+
"typia": "10.1.0",
|
|
56
56
|
"typia-rspack-plugin": "2.2.2",
|
|
57
|
-
"@lynx-js/react": "0.115.
|
|
57
|
+
"@lynx-js/react": "0.115.1",
|
|
58
58
|
"@lynx-js/react-transform": "0.2.0",
|
|
59
|
-
"@lynx-js/rspeedy": "0.12.
|
|
59
|
+
"@lynx-js/rspeedy": "0.12.3",
|
|
60
60
|
"@lynx-js/vitest-setup": "0.0.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|