@lynx-js/react-rsbuild-plugin-canary 0.12.1-canary-20251208-a01fa58b → 0.12.1-canary-20251209-cabeef52

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 CHANGED
@@ -1,17 +1,19 @@
1
1
  # @lynx-js/react-rsbuild-plugin
2
2
 
3
- ## 0.12.1-canary-20251208100710-a01fa58b9801a6f163a067063ab448fc4fb0ea5a
3
+ ## 0.12.1-canary-20251209035405-cabeef520894b67a49618ea5a5db9496b05db718
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [[`a01fa58`](https://github.com/lynx-family/lynx-stack/commit/a01fa58b9801a6f163a067063ab448fc4fb0ea5a), [`8cdb69d`](https://github.com/lynx-family/lynx-stack/commit/8cdb69d4b2cc3e9925a2494ee8a889d7af17e2e9), [`8cdb69d`](https://github.com/lynx-family/lynx-stack/commit/8cdb69d4b2cc3e9925a2494ee8a889d7af17e2e9)]:
8
- - @lynx-js/react@0.115.1-canary-20251208100710-a01fa58b9801a6f163a067063ab448fc4fb0ea5a
9
- - @lynx-js/css-extract-webpack-plugin@0.7.0-canary-20251208100710-a01fa58b9801a6f163a067063ab448fc4fb0ea5a
10
- - @lynx-js/template-webpack-plugin@0.10.0-canary-20251208100710-a01fa58b9801a6f163a067063ab448fc4fb0ea5a
11
- - @lynx-js/react-alias-rsbuild-plugin@0.12.1-canary-20251208100710-a01fa58b9801a6f163a067063ab448fc4fb0ea5a
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 [[`a01fa58`](https://github.com/lynx-family/lynx-stack/commit/a01fa58b9801a6f163a067063ab448fc4fb0ea5a), [`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@0.115.1-canary-20251209035405-cabeef520894b67a49618ea5a5db9496b05db718
11
+ - @lynx-js/react-webpack-plugin@0.7.3-canary-20251209035405-cabeef520894b67a49618ea5a5db9496b05db718
12
+ - @lynx-js/css-extract-webpack-plugin@0.7.0-canary-20251209035405-cabeef520894b67a49618ea5a5db9496b05db718
13
+ - @lynx-js/template-webpack-plugin@0.10.0-canary-20251209035405-cabeef520894b67a49618ea5a5db9496b05db718
14
+ - @lynx-js/react-alias-rsbuild-plugin@0.12.1-canary-20251209035405-cabeef520894b67a49618ea5a5db9496b05db718
12
15
  - @lynx-js/use-sync-external-store@1.5.0
13
- - @lynx-js/react-refresh-webpack-plugin@1.0.0-canary-20251208100710-a01fa58b9801a6f163a067063ab448fc4fb0ea5a
14
- - @lynx-js/react-webpack-plugin@1.0.0-canary-20251208100710-a01fa58b9801a6f163a067063ab448fc4fb0ea5a
16
+ - @lynx-js/react-refresh-webpack-plugin@0.3.4
15
17
 
16
18
  ## 0.12.0
17
19
 
package/dist/index.js CHANGED
@@ -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(isDev && !isWeb, (entry)=>{
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(isDev && !isWeb, (entry)=>{
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-canary",
3
- "version": "0.12.1-canary-20251208-a01fa58b",
3
+ "version": "0.12.1-canary-20251209-cabeef52",
4
4
  "description": "A rsbuild plugin for ReactLynx",
5
5
  "keywords": [
6
6
  "rsbuild",
@@ -32,12 +32,12 @@
32
32
  "README.md"
33
33
  ],
34
34
  "dependencies": {
35
- "@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.7.0-canary-20251208-a01fa58b",
36
- "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.12.1-canary-20251208-a01fa58b",
37
- "@lynx-js/react-refresh-webpack-plugin": "npm:@lynx-js/react-refresh-webpack-plugin-canary@1.0.0-canary-20251208-a01fa58b",
38
- "@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@1.0.0-canary-20251208-a01fa58b",
35
+ "@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.7.0-canary-20251209-cabeef52",
36
+ "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.12.1-canary-20251209-cabeef52",
37
+ "@lynx-js/react-refresh-webpack-plugin": "npm:@lynx-js/react-refresh-webpack-plugin-canary@0.3.4",
38
+ "@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.7.3-canary-20251209-cabeef52",
39
39
  "@lynx-js/runtime-wrapper-webpack-plugin": "npm:@lynx-js/runtime-wrapper-webpack-plugin-canary@0.1.3",
40
- "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.10.0-canary-20251208-a01fa58b",
40
+ "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.10.0-canary-20251209-cabeef52",
41
41
  "@lynx-js/use-sync-external-store": "npm:@lynx-js/use-sync-external-store-canary@1.5.0",
42
42
  "background-only": "npm:background-only-canary@0.0.1"
43
43
  },
@@ -54,10 +54,10 @@
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": "npm:@lynx-js/react-canary@0.115.1-canary-20251208-a01fa58b",
58
- "@lynx-js/vitest-setup": "0.0.0",
57
+ "@lynx-js/react": "npm:@lynx-js/react-canary@0.115.1-canary-20251209-cabeef52",
59
58
  "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.12.1",
60
- "@lynx-js/react-transform": "0.2.0"
59
+ "@lynx-js/react-transform": "0.2.0",
60
+ "@lynx-js/vitest-setup": "0.0.0"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@lynx-js/react": "*"