@lynx-js/react-rsbuild-plugin 0.11.2 → 0.11.4

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,5 +1,54 @@
1
1
  # @lynx-js/react-rsbuild-plugin
2
2
 
3
+ ## 0.11.4
4
+
5
+ ### Patch Changes
6
+
7
+ - When engineVersion is greater than or equal to 3.1, use `__SetAttribute` to set text attribute for text node instead of creating a raw text node. ([#1880](https://github.com/lynx-family/lynx-stack/pull/1880))
8
+
9
+ - Add `react-compiler-runtime` to `resolve.dedupe`. ([#1269](https://github.com/lynx-family/lynx-stack/pull/1269))
10
+
11
+ With this change you can setup [React Compiler](https://react.dev/learn/react-compiler) for ReactLynx by `pluginBabel`:
12
+
13
+ ```js
14
+ import { defineConfig } from '@lynx-js/rspeedy'
15
+ import { pluginBabel } from '@rsbuild/plugin-babel'
16
+
17
+ export default defineConfig({
18
+ plugins: [
19
+ pluginBabel({
20
+ include: /\.(?:jsx|tsx)$/,
21
+ babelLoaderOptions(opts) {
22
+ opts.plugins?.unshift([
23
+ 'babel-plugin-react-compiler',
24
+ // See https://react.dev/reference/react-compiler/configuration for config
25
+ {
26
+ // ReactLynx only supports target to version 17
27
+ target: '17',
28
+ },
29
+ ])
30
+ },
31
+ }),
32
+ ],
33
+ })
34
+ ```
35
+
36
+ - Updated dependencies [[`e7d186a`](https://github.com/lynx-family/lynx-stack/commit/e7d186a6fcf08fecf18b5ab82b004b955bb1a2b3), [`0d7a4c3`](https://github.com/lynx-family/lynx-stack/commit/0d7a4c3d49d63e30d5f05c372ef99ee5cf2fcadd)]:
37
+ - @lynx-js/react-webpack-plugin@0.7.2
38
+ - @lynx-js/react-alias-rsbuild-plugin@0.11.4
39
+ - @lynx-js/use-sync-external-store@1.5.0
40
+ - @lynx-js/react-refresh-webpack-plugin@0.3.4
41
+
42
+ ## 0.11.3
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [[`96545dd`](https://github.com/lynx-family/lynx-stack/commit/96545dd9f966c07aa64437aefc781a9f3e260861)]:
47
+ - @lynx-js/template-webpack-plugin@0.9.1
48
+ - @lynx-js/css-extract-webpack-plugin@0.6.4
49
+ - @lynx-js/react-webpack-plugin@0.7.1
50
+ - @lynx-js/react-alias-rsbuild-plugin@0.11.3
51
+
3
52
  ## 0.11.2
4
53
 
5
54
  ### Patch Changes
package/dist/index.js CHANGED
@@ -469,7 +469,7 @@ function applyLazy(api) {
469
469
  });
470
470
  }
471
471
  function applyLoaders(api, options) {
472
- const { compat, enableRemoveCSSScope, shake, defineDCE, experimental_isLazyBundle } = options;
472
+ const { compat, enableRemoveCSSScope, shake, defineDCE, engineVersion, experimental_isLazyBundle } = options;
473
473
  api.modifyBundlerChain((chain, { CHAIN_ID })=>{
474
474
  const experiments = chain.get('experiments');
475
475
  chain.experiments({
@@ -486,7 +486,8 @@ function applyLoaders(api, options) {
486
486
  enableRemoveCSSScope,
487
487
  isDynamicComponent: experimental_isLazyBundle,
488
488
  inlineSourcesContent,
489
- defineDCE
489
+ defineDCE,
490
+ engineVersion
490
491
  }).end();
491
492
  const mainThreadRule = rule.oneOf(LAYERS.MAIN_THREAD);
492
493
  mainThreadRule.issuerLayer(LAYERS.MAIN_THREAD).uses.merge(uses).end().when(void 0 !== uses[CHAIN_ID.USE.SWC], (rule)=>{
@@ -505,6 +506,7 @@ function applyLoaders(api, options) {
505
506
  enableRemoveCSSScope,
506
507
  inlineSourcesContent,
507
508
  isDynamicComponent: experimental_isLazyBundle,
509
+ engineVersion,
508
510
  shake,
509
511
  defineDCE
510
512
  }).end();
@@ -1241,6 +1243,13 @@ function pluginReactLynx(userOptions) {
1241
1243
  }
1242
1244
  }
1243
1245
  }, config);
1246
+ config = mergeRsbuildConfig({
1247
+ resolve: {
1248
+ dedupe: [
1249
+ 'react-compiler-runtime'
1250
+ ]
1251
+ }
1252
+ }, config);
1244
1253
  return config;
1245
1254
  });
1246
1255
  if (resolvedOptions.experimental_isLazyBundle) applyLazy(api);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-rsbuild-plugin",
3
- "version": "0.11.2",
3
+ "version": "0.11.4",
4
4
  "description": "A rsbuild plugin for ReactLynx",
5
5
  "keywords": [
6
6
  "rsbuild",
@@ -33,29 +33,30 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@lynx-js/css-extract-webpack-plugin": "0.6.4",
36
- "@lynx-js/react-alias-rsbuild-plugin": "0.11.2",
36
+ "@lynx-js/react-alias-rsbuild-plugin": "0.11.4",
37
37
  "@lynx-js/react-refresh-webpack-plugin": "0.3.4",
38
+ "@lynx-js/react-webpack-plugin": "0.7.2",
38
39
  "@lynx-js/runtime-wrapper-webpack-plugin": "0.1.3",
39
- "@lynx-js/template-webpack-plugin": "0.9.0",
40
- "@lynx-js/react-webpack-plugin": "0.7.1",
40
+ "@lynx-js/template-webpack-plugin": "0.9.1",
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.5.13",
47
+ "@rsbuild/core": "1.5.17",
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
+ "source-map": "^0.7.6",
52
53
  "tailwindcss": "^3.4.17",
53
54
  "type-fest": "^5.0.1",
54
55
  "typia": "9.7.2",
55
56
  "typia-rspack-plugin": "2.2.2",
56
- "@lynx-js/react": "0.114.2",
57
+ "@lynx-js/react": "0.114.4",
57
58
  "@lynx-js/react-transform": "0.2.0",
58
- "@lynx-js/rspeedy": "0.11.6",
59
+ "@lynx-js/rspeedy": "0.11.9",
59
60
  "@lynx-js/vitest-setup": "0.0.0"
60
61
  },
61
62
  "peerDependencies": {