@lynx-js/react-rsbuild-plugin 0.10.8 → 0.10.10

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/index.js +14 -1
  3. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @lynx-js/react-rsbuild-plugin
2
2
 
3
+ ## 0.10.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`e9edca0`](https://github.com/lynx-family/lynx-stack/commit/e9edca0183c172b496f9d23ed17581ce3cb3d21d), [`6f37db2`](https://github.com/lynx-family/lynx-stack/commit/6f37db2bd4438ca60322b60f5144220e8d062074)]:
8
+ - @lynx-js/template-webpack-plugin@0.8.3
9
+ - @lynx-js/css-extract-webpack-plugin@0.6.1
10
+ - @lynx-js/react-webpack-plugin@0.6.19
11
+ - @lynx-js/react-alias-rsbuild-plugin@0.10.10
12
+ - @lynx-js/use-sync-external-store@1.5.0
13
+ - @lynx-js/react-refresh-webpack-plugin@0.3.4
14
+
15
+ ## 0.10.9
16
+
17
+ ### Patch Changes
18
+
19
+ - Be compat with `@lynx-js/react` v0.112.0 ([#1323](https://github.com/lynx-family/lynx-stack/pull/1323))
20
+
21
+ - Fix not having profile in development by default. ([#1306](https://github.com/lynx-family/lynx-stack/pull/1306))
22
+
23
+ - Updated dependencies [[`fcafd54`](https://github.com/lynx-family/lynx-stack/commit/fcafd541c535f354476cf439b8ba97b00530aa52), [`fe38de5`](https://github.com/lynx-family/lynx-stack/commit/fe38de505b87b768035e3a833bdf8415dc4023ac), [`7cd5ea2`](https://github.com/lynx-family/lynx-stack/commit/7cd5ea2cebf12aa982ddc048dec4c5c7ed6bc1d6)]:
24
+ - @lynx-js/react-alias-rsbuild-plugin@0.10.9
25
+ - @lynx-js/react-webpack-plugin@0.6.19
26
+ - @lynx-js/use-sync-external-store@1.5.0
27
+ - @lynx-js/react-refresh-webpack-plugin@0.3.4
28
+
3
29
  ## 0.10.8
4
30
 
5
31
  ### Patch Changes
package/dist/index.js CHANGED
@@ -390,6 +390,7 @@ function applyEntry(api, options) {
390
390
  }
391
391
  if (isWeb) chain.plugin(PLUGIN_NAME_WEB).use(WebEncodePlugin, []).end();
392
392
  const rsbuildConfig = api.getRsbuildConfig();
393
+ const userConfig = api.getRsbuildConfig('original');
393
394
  let extractStr = originalExtractStr;
394
395
  if (rsbuildConfig.performance?.chunkSplit?.strategy !== 'all-in-one' && originalExtractStr) {
395
396
  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.`');
@@ -403,11 +404,23 @@ function applyEntry(api, options) {
403
404
  mainThreadChunks,
404
405
  extractStr,
405
406
  experimental_isLazyBundle,
406
- profile: rsbuildConfig.performance?.profile
407
+ profile: getDefaultProfile()
407
408
  }
408
409
  ]);
410
+ function getDefaultProfile() {
411
+ if (userConfig.performance?.profile !== void 0) return userConfig.performance.profile;
412
+ if (isDebug()) return true;
413
+ }
409
414
  });
410
415
  }
416
+ const isDebug = ()=>{
417
+ if (!process.env['DEBUG']) return false;
418
+ const values = process.env['DEBUG'].toLocaleLowerCase().split(',');
419
+ return [
420
+ 'rspeedy',
421
+ '*'
422
+ ].some((key)=>values.includes(key));
423
+ };
411
424
  function getChunks(entryName, entryValue) {
412
425
  const chunks = [
413
426
  entryName
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-rsbuild-plugin",
3
- "version": "0.10.8",
3
+ "version": "0.10.10",
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.0",
36
- "@lynx-js/react-alias-rsbuild-plugin": "0.10.8",
35
+ "@lynx-js/css-extract-webpack-plugin": "0.6.1",
36
+ "@lynx-js/react-alias-rsbuild-plugin": "0.10.10",
37
37
  "@lynx-js/react-refresh-webpack-plugin": "0.3.4",
38
- "@lynx-js/react-webpack-plugin": "0.6.18",
38
+ "@lynx-js/react-webpack-plugin": "0.6.19",
39
39
  "@lynx-js/runtime-wrapper-webpack-plugin": "0.1.2",
40
- "@lynx-js/template-webpack-plugin": "0.8.2",
40
+ "@lynx-js/template-webpack-plugin": "0.8.3",
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.52.8",
45
+ "@microsoft/api-extractor": "7.52.10",
46
46
  "@rollup/plugin-typescript": "^12.1.4",
47
- "@rsbuild/core": "1.4.7",
47
+ "@rsbuild/core": "1.4.12",
48
48
  "@rsbuild/plugin-sass": "1.3.3",
49
49
  "@rsbuild/plugin-typed-css-modules": "1.0.2",
50
50
  "@rsbuild/plugin-webpack-swc": "1.1.1",
@@ -54,13 +54,13 @@
54
54
  "type-fest": "^4.41.0",
55
55
  "typia": "9.3.1",
56
56
  "typia-rspack-plugin": "2.1.0",
57
- "@lynx-js/react": "0.111.2",
57
+ "@lynx-js/react": "0.112.1",
58
58
  "@lynx-js/react-transform": "0.2.0",
59
- "@lynx-js/rspeedy": "0.10.2",
59
+ "@lynx-js/rspeedy": "0.10.4",
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"
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"
64
64
  },
65
65
  "peerDependenciesMeta": {
66
66
  "@lynx-js/react": {