@lynx-js/react-rsbuild-plugin 0.12.0 → 0.12.1
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 +14 -0
- package/dist/300.js +3 -3
- package/dist/index.js +22 -17
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @lynx-js/react-rsbuild-plugin
|
|
2
2
|
|
|
3
|
+
## 0.12.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 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))
|
|
8
|
+
|
|
9
|
+
- 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)]:
|
|
10
|
+
- @lynx-js/react-webpack-plugin@0.7.3
|
|
11
|
+
- @lynx-js/css-extract-webpack-plugin@0.7.0
|
|
12
|
+
- @lynx-js/template-webpack-plugin@0.10.0
|
|
13
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.12.1
|
|
14
|
+
- @lynx-js/use-sync-external-store@1.5.0
|
|
15
|
+
- @lynx-js/react-refresh-webpack-plugin@0.3.4
|
|
16
|
+
|
|
3
17
|
## 0.12.0
|
|
4
18
|
|
|
5
19
|
### 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@9.7.2_typescript@5.9.3/node_modules/typia/lib/internal/_accessExpressionAsString.js"
|
|
10
|
+
"../../../node_modules/.pnpm/typia@9.7.2_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,7 +52,7 @@ var __webpack_modules__ = {
|
|
|
52
52
|
"with"
|
|
53
53
|
]);
|
|
54
54
|
},
|
|
55
|
-
"../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.3/node_modules/typia/lib/internal/_assertGuard.js"
|
|
55
|
+
"../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.3/node_modules/typia/lib/internal/_assertGuard.js" (__unused_webpack_module, exports, __webpack_require__) {
|
|
56
56
|
exports._assertGuard = void 0;
|
|
57
57
|
const TypeGuardError_1 = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.3/node_modules/typia/lib/TypeGuardError.mjs");
|
|
58
58
|
const _assertGuard = (exceptionable, props, factory)=>{
|
|
@@ -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@9.7.2_typescript@5.9.3/node_modules/typia/lib/TypeGuardError.mjs"
|
|
74
|
+
"../../../node_modules/.pnpm/typia@9.7.2_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) {
|
|
@@ -292,6 +292,9 @@ function applyEntry(api, options) {
|
|
|
292
292
|
const entries = chain.entryPoints.entries() ?? {};
|
|
293
293
|
const isLynx = 'lynx' === environment.name;
|
|
294
294
|
const isWeb = 'web' === environment.name;
|
|
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',
|
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.1",
|
|
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.
|
|
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.1",
|
|
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
45
|
"@microsoft/api-extractor": "7.52.15",
|
|
46
46
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
47
|
-
"@rsbuild/core": "1.6.
|
|
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",
|
|
@@ -54,9 +54,9 @@
|
|
|
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.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.2",
|
|
60
60
|
"@lynx-js/vitest-setup": "0.0.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|