create-rsbuild 2.0.0-beta.7 → 2.0.0-beta.9

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 (31) hide show
  1. package/dist/index.js +22 -9
  2. package/package.json +12 -12
  3. package/template-lit-js/package.json +1 -1
  4. package/template-lit-ts/package.json +1 -1
  5. package/template-preact-js/package.json +3 -3
  6. package/template-preact-ts/package.json +3 -3
  7. package/template-react-compiler/react-js/package.json +6 -0
  8. package/template-react-compiler/react-js/rsbuild.config.js +17 -0
  9. package/template-react-compiler/react-ts/package.json +6 -0
  10. package/template-react-compiler/react-ts/rsbuild.config.ts +16 -0
  11. package/template-react-js/package.json +2 -2
  12. package/template-react-ts/package.json +2 -2
  13. package/template-react18-js/package.json +2 -2
  14. package/template-react18-ts/package.json +2 -2
  15. package/template-rstest/react-js/package.json +2 -2
  16. package/template-rstest/react-ts/package.json +2 -2
  17. package/template-rstest/vanilla-js/package.json +2 -2
  18. package/template-rstest/vanilla-ts/package.json +2 -2
  19. package/template-rstest/vue-js/package.json +2 -2
  20. package/template-rstest/vue-ts/package.json +2 -2
  21. package/template-solid-js/package.json +3 -3
  22. package/template-solid-ts/package.json +3 -3
  23. package/template-svelte-js/package.json +3 -3
  24. package/template-svelte-ts/package.json +4 -4
  25. package/template-vanilla-js/package.json +1 -1
  26. package/template-vanilla-ts/package.json +1 -1
  27. package/template-vue2-js/package.json +1 -1
  28. package/template-vue2-ts/package.json +1 -1
  29. package/template-vue3-js/package.json +3 -3
  30. package/template-vue3-ts/package.json +3 -3
  31. package/template-vue3-ts/src/env.d.ts +0 -1
package/dist/index.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import node_fs from "node:fs";
2
2
  import node_path from "node:path";
3
- import { fileURLToPath } from "node:url";
4
3
  import { checkCancel, copyFolder, create, select as external_create_rstack_select } from "create-rstack";
5
- const src_dirname = node_path.dirname(fileURLToPath(import.meta.url));
6
4
  const frameworkAlias = {
7
5
  vue: 'vue3',
8
6
  'solid-js': 'solid'
@@ -87,9 +85,9 @@ function mapESLintTemplate(templateName) {
87
85
  return 'react-js';
88
86
  case 'react18-ts':
89
87
  return 'react-ts';
88
+ default:
89
+ return `vanilla-${templateName.split('-')[1]}`;
90
90
  }
91
- const language = templateName.split('-')[1];
92
- return `vanilla-${language}`;
93
91
  }
94
92
  function mapRstestTemplate(templateName) {
95
93
  switch(templateName){
@@ -103,12 +101,13 @@ function mapRstestTemplate(templateName) {
103
101
  return 'vue-js';
104
102
  case 'vue3-ts':
105
103
  return 'vue-ts';
104
+ default:
105
+ return `vanilla-${templateName.split('-')[1]}`;
106
106
  }
107
- const language = templateName.split('-')[1];
108
- return `vanilla-${language}`;
109
107
  }
108
+ const root = node_path.join(import.meta.dirname, '..');
110
109
  create({
111
- root: node_path.resolve(src_dirname, '..'),
110
+ root: root,
112
111
  name: 'rsbuild',
113
112
  templates: [
114
113
  'vanilla-js',
@@ -135,7 +134,7 @@ create({
135
134
  order: 'pre',
136
135
  action: ({ templateName, distFolder, addAgentsMdSearchDirs })=>{
137
136
  const rstestTemplate = mapRstestTemplate(templateName);
138
- const toolFolder = node_path.join(src_dirname, '..', 'template-rstest');
137
+ const toolFolder = node_path.join(root, 'template-rstest');
139
138
  const subFolder = node_path.join(toolFolder, rstestTemplate);
140
139
  copyFolder({
141
140
  from: subFolder,
@@ -145,11 +144,25 @@ create({
145
144
  addAgentsMdSearchDirs(toolFolder);
146
145
  }
147
146
  },
147
+ {
148
+ value: 'react-compiler',
149
+ label: 'React Compiler - optimization',
150
+ order: 'pre',
151
+ when: (template)=>'react-js' === template || 'react-ts' === template,
152
+ action: ({ templateName, distFolder })=>{
153
+ const toolFolder = node_path.join(root, 'template-react-compiler');
154
+ copyFolder({
155
+ from: node_path.join(toolFolder, templateName),
156
+ to: distFolder,
157
+ isMergePackageJson: true
158
+ });
159
+ }
160
+ },
148
161
  {
149
162
  value: 'tailwindcss',
150
163
  label: 'Tailwind CSS - styling',
151
164
  action: async ({ distFolder })=>{
152
- const from = node_path.join(src_dirname, '..', 'template-tailwindcss');
165
+ const from = node_path.join(root, 'template-tailwindcss');
153
166
  copyFolder({
154
167
  from: from,
155
168
  to: distFolder,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rsbuild",
3
- "version": "2.0.0-beta.7",
3
+ "version": "2.0.0-beta.9",
4
4
  "description": "Create a new Rsbuild project",
5
5
  "homepage": "https://rsbuild.rs",
6
6
  "repository": {
@@ -23,19 +23,19 @@
23
23
  "bin.js"
24
24
  ],
25
25
  "dependencies": {
26
- "create-rstack": "1.8.0"
26
+ "create-rstack": "1.8.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@rsbuild/plugin-react": "^1.1.0",
30
- "@rslib/core": "0.19.6",
31
- "@types/node": "^24.11.0",
30
+ "@rslib/core": "0.20.0",
31
+ "@types/node": "^24.12.0",
32
32
  "typescript": "^5.9.3",
33
- "@rsbuild/core": "2.0.0-beta.7",
34
- "@rsbuild/plugin-babel": "1.1.1",
35
- "@rsbuild/plugin-preact": "1.7.1",
36
- "@rsbuild/plugin-solid": "1.1.0",
37
- "@rsbuild/plugin-svelte": "1.1.0",
38
- "@rsbuild/plugin-vue": "1.2.6"
33
+ "@rsbuild/core": "2.0.0-beta.9",
34
+ "@rsbuild/plugin-babel": "1.1.2",
35
+ "@rsbuild/plugin-preact": "1.7.2",
36
+ "@rsbuild/plugin-solid": "1.1.1",
37
+ "@rsbuild/plugin-svelte": "1.1.1",
38
+ "@rsbuild/plugin-vue": "1.2.7"
39
39
  },
40
40
  "engines": {
41
41
  "node": "^20.19.0 || >=22.12.0"
@@ -45,8 +45,8 @@
45
45
  "registry": "https://registry.npmjs.org/"
46
46
  },
47
47
  "scripts": {
48
- "build": "rslib build",
49
- "dev": "rslib build -w",
48
+ "build": "rslib build --syntax es2023",
49
+ "dev": "rslib build --syntax es2023 -w",
50
50
  "start": "node ./dist/index.js",
51
51
  "bump": "pnpx bumpp --no-tag"
52
52
  }
@@ -12,6 +12,6 @@
12
12
  "lit": "^3.3.2"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^2.0.0-beta.6"
15
+ "@rsbuild/core": "^2.0.0-beta.7"
16
16
  }
17
17
  }
@@ -12,7 +12,7 @@
12
12
  "lit": "^3.3.2"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^2.0.0-beta.6",
15
+ "@rsbuild/core": "^2.0.0-beta.7",
16
16
  "typescript": "^5.9.3"
17
17
  }
18
18
  }
@@ -9,10 +9,10 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "preact": "^10.28.4"
12
+ "preact": "^10.29.0"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^2.0.0-beta.6",
16
- "@rsbuild/plugin-preact": "^1.7.1"
15
+ "@rsbuild/core": "^2.0.0-beta.7",
16
+ "@rsbuild/plugin-preact": "^1.7.2"
17
17
  }
18
18
  }
@@ -9,11 +9,11 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "preact": "^10.28.4"
12
+ "preact": "^10.29.0"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^2.0.0-beta.6",
16
- "@rsbuild/plugin-preact": "^1.7.1",
15
+ "@rsbuild/core": "^2.0.0-beta.7",
16
+ "@rsbuild/plugin-preact": "^1.7.2",
17
17
  "typescript": "^5.9.3"
18
18
  }
19
19
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "devDependencies": {
3
+ "@rsbuild/plugin-babel": "^1.1.2",
4
+ "babel-plugin-react-compiler": "^1.0.0"
5
+ }
6
+ }
@@ -0,0 +1,17 @@
1
+ // @ts-check
2
+ import { defineConfig } from '@rsbuild/core';
3
+ import { pluginBabel } from '@rsbuild/plugin-babel';
4
+ import { pluginReact } from '@rsbuild/plugin-react';
5
+
6
+ // Docs: https://rsbuild.rs/config/
7
+ export default defineConfig({
8
+ plugins: [
9
+ pluginReact(),
10
+ pluginBabel({
11
+ include: /\.(?:jsx|tsx)$/,
12
+ babelLoaderOptions(opts) {
13
+ opts.plugins?.unshift('babel-plugin-react-compiler');
14
+ },
15
+ }),
16
+ ],
17
+ });
@@ -0,0 +1,6 @@
1
+ {
2
+ "devDependencies": {
3
+ "@rsbuild/plugin-babel": "^1.1.2",
4
+ "babel-plugin-react-compiler": "^1.0.0"
5
+ }
6
+ }
@@ -0,0 +1,16 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+ import { pluginBabel } from '@rsbuild/plugin-babel';
3
+ import { pluginReact } from '@rsbuild/plugin-react';
4
+
5
+ // Docs: https://rsbuild.rs/config/
6
+ export default defineConfig({
7
+ plugins: [
8
+ pluginReact(),
9
+ pluginBabel({
10
+ include: /\.(?:jsx|tsx)$/,
11
+ babelLoaderOptions(opts) {
12
+ opts.plugins?.unshift('babel-plugin-react-compiler');
13
+ },
14
+ }),
15
+ ],
16
+ });
@@ -13,7 +13,7 @@
13
13
  "react-dom": "^19.2.4"
14
14
  },
15
15
  "devDependencies": {
16
- "@rsbuild/core": "^2.0.0-beta.6",
17
- "@rsbuild/plugin-react": "^1.4.5"
16
+ "@rsbuild/core": "^2.0.0-beta.7",
17
+ "@rsbuild/plugin-react": "^1.4.6"
18
18
  }
19
19
  }
@@ -13,8 +13,8 @@
13
13
  "react-dom": "^19.2.4"
14
14
  },
15
15
  "devDependencies": {
16
- "@rsbuild/core": "^2.0.0-beta.6",
17
- "@rsbuild/plugin-react": "^1.4.5",
16
+ "@rsbuild/core": "^2.0.0-beta.7",
17
+ "@rsbuild/plugin-react": "^1.4.6",
18
18
  "@types/react": "^19.2.14",
19
19
  "@types/react-dom": "^19.2.3",
20
20
  "typescript": "^5.9.3"
@@ -13,7 +13,7 @@
13
13
  "react-dom": "^18.3.1"
14
14
  },
15
15
  "devDependencies": {
16
- "@rsbuild/core": "^2.0.0-beta.6",
17
- "@rsbuild/plugin-react": "^1.4.5"
16
+ "@rsbuild/core": "^2.0.0-beta.7",
17
+ "@rsbuild/plugin-react": "^1.4.6"
18
18
  }
19
19
  }
@@ -13,8 +13,8 @@
13
13
  "react-dom": "^18.3.1"
14
14
  },
15
15
  "devDependencies": {
16
- "@rsbuild/core": "^2.0.0-beta.6",
17
- "@rsbuild/plugin-react": "^1.4.5",
16
+ "@rsbuild/core": "^2.0.0-beta.7",
17
+ "@rsbuild/plugin-react": "^1.4.6",
18
18
  "@types/react": "^18.3.18",
19
19
  "@types/react-dom": "^18.3.5",
20
20
  "typescript": "^5.9.3"
@@ -7,8 +7,8 @@
7
7
  "@testing-library/dom": "^10.4.1",
8
8
  "@testing-library/jest-dom": "^6.9.1",
9
9
  "@testing-library/react": "^16.3.2",
10
- "@rstest/core": "^0.9.0",
10
+ "@rstest/core": "^0.9.2",
11
11
  "@rstest/adapter-rsbuild": "^0.2.2",
12
- "happy-dom": "^20.8.3"
12
+ "happy-dom": "^20.8.4"
13
13
  }
14
14
  }
@@ -7,8 +7,8 @@
7
7
  "@testing-library/dom": "^10.4.1",
8
8
  "@testing-library/jest-dom": "^6.9.1",
9
9
  "@testing-library/react": "^16.3.2",
10
- "@rstest/core": "^0.9.0",
10
+ "@rstest/core": "^0.9.2",
11
11
  "@rstest/adapter-rsbuild": "^0.2.2",
12
- "happy-dom": "^20.8.3"
12
+ "happy-dom": "^20.8.4"
13
13
  }
14
14
  }
@@ -6,8 +6,8 @@
6
6
  "devDependencies": {
7
7
  "@testing-library/dom": "^10.4.1",
8
8
  "@testing-library/jest-dom": "^6.9.1",
9
- "@rstest/core": "^0.9.0",
9
+ "@rstest/core": "^0.9.2",
10
10
  "@rstest/adapter-rsbuild": "^0.2.2",
11
- "happy-dom": "^20.8.3"
11
+ "happy-dom": "^20.8.4"
12
12
  }
13
13
  }
@@ -6,8 +6,8 @@
6
6
  "devDependencies": {
7
7
  "@testing-library/dom": "^10.4.1",
8
8
  "@testing-library/jest-dom": "^6.9.1",
9
- "@rstest/core": "^0.9.0",
9
+ "@rstest/core": "^0.9.2",
10
10
  "@rstest/adapter-rsbuild": "^0.2.2",
11
- "happy-dom": "^20.8.3"
11
+ "happy-dom": "^20.8.4"
12
12
  }
13
13
  }
@@ -7,8 +7,8 @@
7
7
  "@testing-library/dom": "^10.4.1",
8
8
  "@testing-library/jest-dom": "^6.9.1",
9
9
  "@testing-library/vue": "^8.1.0",
10
- "@rstest/core": "^0.9.0",
10
+ "@rstest/core": "^0.9.2",
11
11
  "@rstest/adapter-rsbuild": "^0.2.2",
12
- "happy-dom": "^20.8.3"
12
+ "happy-dom": "^20.8.4"
13
13
  }
14
14
  }
@@ -7,8 +7,8 @@
7
7
  "@testing-library/dom": "^10.4.1",
8
8
  "@testing-library/jest-dom": "^6.9.1",
9
9
  "@testing-library/vue": "^8.1.0",
10
- "@rstest/core": "^0.9.0",
10
+ "@rstest/core": "^0.9.2",
11
11
  "@rstest/adapter-rsbuild": "^0.2.2",
12
- "happy-dom": "^20.8.3"
12
+ "happy-dom": "^20.8.4"
13
13
  }
14
14
  }
@@ -12,8 +12,8 @@
12
12
  "solid-js": "^1.9.11"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^2.0.0-beta.6",
16
- "@rsbuild/plugin-babel": "^1.1.1",
17
- "@rsbuild/plugin-solid": "^1.1.0"
15
+ "@rsbuild/core": "^2.0.0-beta.7",
16
+ "@rsbuild/plugin-babel": "^1.1.2",
17
+ "@rsbuild/plugin-solid": "^1.1.1"
18
18
  }
19
19
  }
@@ -12,9 +12,9 @@
12
12
  "solid-js": "^1.9.11"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^2.0.0-beta.6",
16
- "@rsbuild/plugin-babel": "^1.1.1",
17
- "@rsbuild/plugin-solid": "^1.1.0",
15
+ "@rsbuild/core": "^2.0.0-beta.7",
16
+ "@rsbuild/plugin-babel": "^1.1.2",
17
+ "@rsbuild/plugin-solid": "^1.1.1",
18
18
  "typescript": "^5.9.3"
19
19
  }
20
20
  }
@@ -9,10 +9,10 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "svelte": "^5.53.7"
12
+ "svelte": "^5.53.12"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^2.0.0-beta.6",
16
- "@rsbuild/plugin-svelte": "^1.1.0"
15
+ "@rsbuild/core": "^2.0.0-beta.7",
16
+ "@rsbuild/plugin-svelte": "^1.1.1"
17
17
  }
18
18
  }
@@ -10,12 +10,12 @@
10
10
  "svelte-check": "svelte-check --tsconfig ./tsconfig.json"
11
11
  },
12
12
  "dependencies": {
13
- "svelte": "^5.53.7"
13
+ "svelte": "^5.53.12"
14
14
  },
15
15
  "devDependencies": {
16
- "@rsbuild/core": "^2.0.0-beta.6",
17
- "@rsbuild/plugin-svelte": "^1.1.0",
18
- "svelte-check": "^4.4.4",
16
+ "@rsbuild/core": "^2.0.0-beta.7",
17
+ "@rsbuild/plugin-svelte": "^1.1.1",
18
+ "svelte-check": "^4.4.5",
19
19
  "typescript": "^5.9.3"
20
20
  }
21
21
  }
@@ -9,6 +9,6 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "devDependencies": {
12
- "@rsbuild/core": "^2.0.0-beta.6"
12
+ "@rsbuild/core": "^2.0.0-beta.7"
13
13
  }
14
14
  }
@@ -9,7 +9,7 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "devDependencies": {
12
- "@rsbuild/core": "^2.0.0-beta.6",
12
+ "@rsbuild/core": "^2.0.0-beta.7",
13
13
  "typescript": "^5.9.3"
14
14
  }
15
15
  }
@@ -12,7 +12,7 @@
12
12
  "vue": "^2.7.16"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^2.0.0-beta.6",
15
+ "@rsbuild/core": "^2.0.0-beta.7",
16
16
  "@rsbuild/plugin-vue2": "^1.1.1"
17
17
  }
18
18
  }
@@ -12,7 +12,7 @@
12
12
  "vue": "^2.7.16"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^2.0.0-beta.6",
15
+ "@rsbuild/core": "^2.0.0-beta.7",
16
16
  "@rsbuild/plugin-vue2": "^1.1.1",
17
17
  "typescript": "^5.9.3"
18
18
  }
@@ -9,10 +9,10 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "vue": "^3.5.29"
12
+ "vue": "^3.5.30"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^2.0.0-beta.6",
16
- "@rsbuild/plugin-vue": "^1.2.6"
15
+ "@rsbuild/core": "^2.0.0-beta.7",
16
+ "@rsbuild/plugin-vue": "^1.2.7"
17
17
  }
18
18
  }
@@ -9,11 +9,11 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "vue": "^3.5.29"
12
+ "vue": "^3.5.30"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^2.0.0-beta.6",
16
- "@rsbuild/plugin-vue": "^1.2.6",
15
+ "@rsbuild/core": "^2.0.0-beta.7",
16
+ "@rsbuild/plugin-vue": "^1.2.7",
17
17
  "typescript": "^5.9.3"
18
18
  }
19
19
  }
@@ -3,7 +3,6 @@
3
3
  declare module '*.vue' {
4
4
  import type { DefineComponent } from 'vue';
5
5
 
6
- // biome-ignore lint/complexity/noBannedTypes: reason
7
6
  const component: DefineComponent<{}, {}, any>;
8
7
  export default component;
9
8
  }