create-rsbuild 1.2.2 → 1.2.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.
Files changed (38) hide show
  1. package/dist/index.js +14 -4
  2. package/package.json +4 -4
  3. package/template-lit-js/package.json +1 -1
  4. package/template-lit-ts/package.json +1 -1
  5. package/template-lit-ts/tsconfig.json +1 -1
  6. package/template-preact-js/package.json +3 -3
  7. package/template-preact-ts/package.json +3 -3
  8. package/template-preact-ts/tsconfig.json +1 -1
  9. package/template-react-js/package.json +2 -2
  10. package/template-react-ts/package.json +4 -4
  11. package/template-react-ts/tsconfig.json +1 -1
  12. package/template-react18-js/package.json +19 -0
  13. package/template-react18-js/rsbuild.config.mjs +6 -0
  14. package/template-react18-js/src/App.css +26 -0
  15. package/template-react18-js/src/App.jsx +12 -0
  16. package/template-react18-js/src/index.jsx +10 -0
  17. package/template-react18-ts/package.json +22 -0
  18. package/template-react18-ts/rsbuild.config.ts +6 -0
  19. package/template-react18-ts/src/App.css +26 -0
  20. package/template-react18-ts/src/App.tsx +12 -0
  21. package/template-react18-ts/src/env.d.ts +1 -0
  22. package/template-react18-ts/src/index.tsx +13 -0
  23. package/template-react18-ts/tsconfig.json +23 -0
  24. package/template-solid-js/package.json +4 -4
  25. package/template-solid-ts/package.json +4 -4
  26. package/template-solid-ts/tsconfig.json +1 -1
  27. package/template-svelte-js/package.json +3 -3
  28. package/template-svelte-ts/package.json +3 -3
  29. package/template-svelte-ts/tsconfig.json +1 -1
  30. package/template-vanilla-js/package.json +1 -1
  31. package/template-vanilla-ts/package.json +1 -1
  32. package/template-vanilla-ts/tsconfig.json +1 -1
  33. package/template-vue2-js/package.json +1 -1
  34. package/template-vue2-ts/package.json +1 -1
  35. package/template-vue2-ts/tsconfig.json +1 -1
  36. package/template-vue3-js/package.json +2 -2
  37. package/template-vue3-ts/package.json +2 -2
  38. package/template-vue3-ts/tsconfig.json +1 -1
package/dist/index.js CHANGED
@@ -22,7 +22,11 @@ async function getTemplateName({ template }) {
22
22
  },
23
23
  {
24
24
  value: 'react',
25
- label: 'React'
25
+ label: 'React 19'
26
+ },
27
+ {
28
+ value: 'react18',
29
+ label: 'React 18'
26
30
  },
27
31
  {
28
32
  value: 'vue3',
@@ -74,6 +78,10 @@ function mapESLintTemplate(templateName) {
74
78
  case 'svelte-js':
75
79
  case 'svelte-ts':
76
80
  return templateName;
81
+ case 'react18-js':
82
+ return 'react-js';
83
+ case 'react18-ts':
84
+ return 'react-js';
77
85
  }
78
86
  const language = templateName.split('-')[1];
79
87
  return `vanilla-${language}`;
@@ -82,8 +90,12 @@ function mapESLintTemplate(templateName) {
82
90
  root: __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(src_dirname, '..'),
83
91
  name: 'rsbuild',
84
92
  templates: [
93
+ 'vanilla-js',
94
+ 'vanilla-ts',
85
95
  'react-js',
86
96
  'react-ts',
97
+ 'react18-js',
98
+ 'react18-ts',
87
99
  'vue3-js',
88
100
  'vue3-ts',
89
101
  'vue2-js',
@@ -91,9 +103,7 @@ function mapESLintTemplate(templateName) {
91
103
  'svelte-js',
92
104
  'svelte-ts',
93
105
  'solid-js',
94
- 'solid-ts',
95
- 'vanilla-js',
96
- 'vanilla-ts'
106
+ 'solid-ts'
97
107
  ],
98
108
  getTemplateName,
99
109
  mapESLintTemplate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rsbuild",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "Create a new Rsbuild project",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -23,11 +23,11 @@
23
23
  "bin.js"
24
24
  ],
25
25
  "dependencies": {
26
- "create-rstack": "1.2.0"
26
+ "create-rstack": "1.3.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@rslib/core": "0.4.1",
30
- "@types/node": "^22.13.4",
29
+ "@rslib/core": "0.5.1",
30
+ "@types/node": "^22.13.5",
31
31
  "typescript": "^5.7.3"
32
32
  },
33
33
  "engines": {
@@ -12,6 +12,6 @@
12
12
  "lit": "^3.2.1"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.8"
15
+ "@rsbuild/core": "^1.2.11"
16
16
  }
17
17
  }
@@ -12,7 +12,7 @@
12
12
  "lit": "^3.2.1"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.8",
15
+ "@rsbuild/core": "^1.2.11",
16
16
  "typescript": "^5.7.3"
17
17
  }
18
18
  }
@@ -11,7 +11,7 @@
11
11
  "module": "ESNext",
12
12
  "isolatedModules": true,
13
13
  "resolveJsonModule": true,
14
- "moduleResolution": "Bundler",
14
+ "moduleResolution": "bundler",
15
15
  "allowImportingTsExtensions": true,
16
16
 
17
17
  /* type checking */
@@ -9,10 +9,10 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "preact": "^10.26.0"
12
+ "preact": "^10.26.2"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.8",
16
- "@rsbuild/plugin-preact": "^1.3.0"
15
+ "@rsbuild/core": "^1.2.11",
16
+ "@rsbuild/plugin-preact": "^1.3.1"
17
17
  }
18
18
  }
@@ -9,11 +9,11 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "preact": "^10.26.0"
12
+ "preact": "^10.26.2"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.8",
16
- "@rsbuild/plugin-preact": "^1.3.0",
15
+ "@rsbuild/core": "^1.2.11",
16
+ "@rsbuild/plugin-preact": "^1.3.1",
17
17
  "typescript": "^5.7.3"
18
18
  }
19
19
  }
@@ -12,7 +12,7 @@
12
12
  "module": "ESNext",
13
13
  "isolatedModules": true,
14
14
  "resolveJsonModule": true,
15
- "moduleResolution": "Bundler",
15
+ "moduleResolution": "bundler",
16
16
  "allowImportingTsExtensions": true,
17
17
  "paths": {
18
18
  "react": ["./node_modules/preact/compat/"],
@@ -13,7 +13,7 @@
13
13
  "react-dom": "^19.0.0"
14
14
  },
15
15
  "devDependencies": {
16
- "@rsbuild/core": "^1.2.8",
17
- "@rsbuild/plugin-react": "^1.1.0"
16
+ "@rsbuild/core": "^1.2.11",
17
+ "@rsbuild/plugin-react": "^1.1.1"
18
18
  }
19
19
  }
@@ -13,10 +13,10 @@
13
13
  "react-dom": "^19.0.0"
14
14
  },
15
15
  "devDependencies": {
16
- "@rsbuild/core": "^1.2.8",
17
- "@rsbuild/plugin-react": "^1.1.0",
18
- "@types/react": "^19.0.9",
19
- "@types/react-dom": "^19.0.3",
16
+ "@rsbuild/core": "^1.2.11",
17
+ "@rsbuild/plugin-react": "^1.1.1",
18
+ "@types/react": "^19.0.10",
19
+ "@types/react-dom": "^19.0.4",
20
20
  "typescript": "^5.7.3"
21
21
  }
22
22
  }
@@ -11,7 +11,7 @@
11
11
  "module": "ESNext",
12
12
  "isolatedModules": true,
13
13
  "resolveJsonModule": true,
14
- "moduleResolution": "Bundler",
14
+ "moduleResolution": "bundler",
15
15
  "allowImportingTsExtensions": true,
16
16
 
17
17
  /* type checking */
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "rsbuild-react18-js",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "rsbuild build",
8
+ "dev": "rsbuild dev --open",
9
+ "preview": "rsbuild preview"
10
+ },
11
+ "dependencies": {
12
+ "react": "^18.3.1",
13
+ "react-dom": "^18.3.1"
14
+ },
15
+ "devDependencies": {
16
+ "@rsbuild/core": "^1.2.11",
17
+ "@rsbuild/plugin-react": "^1.1.1"
18
+ }
19
+ }
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+ import { pluginReact } from '@rsbuild/plugin-react';
3
+
4
+ export default defineConfig({
5
+ plugins: [pluginReact()],
6
+ });
@@ -0,0 +1,26 @@
1
+ body {
2
+ margin: 0;
3
+ color: #fff;
4
+ font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
5
+ background-image: linear-gradient(to bottom, #020917, #101725);
6
+ }
7
+
8
+ .content {
9
+ display: flex;
10
+ min-height: 100vh;
11
+ line-height: 1.1;
12
+ text-align: center;
13
+ flex-direction: column;
14
+ justify-content: center;
15
+ }
16
+
17
+ .content h1 {
18
+ font-size: 3.6rem;
19
+ font-weight: 700;
20
+ }
21
+
22
+ .content p {
23
+ font-size: 1.2rem;
24
+ font-weight: 400;
25
+ opacity: 0.5;
26
+ }
@@ -0,0 +1,12 @@
1
+ import './App.css';
2
+
3
+ const App = () => {
4
+ return (
5
+ <div className="content">
6
+ <h1>Rsbuild with React</h1>
7
+ <p>Start building amazing things with Rsbuild.</p>
8
+ </div>
9
+ );
10
+ };
11
+
12
+ export default App;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import App from './App';
4
+
5
+ const root = ReactDOM.createRoot(document.getElementById('root'));
6
+ root.render(
7
+ <React.StrictMode>
8
+ <App />
9
+ </React.StrictMode>,
10
+ );
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "rsbuild-react18-ts",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "rsbuild build",
8
+ "dev": "rsbuild dev --open",
9
+ "preview": "rsbuild preview"
10
+ },
11
+ "dependencies": {
12
+ "react": "^18.3.1",
13
+ "react-dom": "^18.3.1"
14
+ },
15
+ "devDependencies": {
16
+ "@rsbuild/core": "^1.2.11",
17
+ "@rsbuild/plugin-react": "^1.1.1",
18
+ "@types/react": "^18.3.18",
19
+ "@types/react-dom": "^18.3.5",
20
+ "typescript": "^5.7.3"
21
+ }
22
+ }
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+ import { pluginReact } from '@rsbuild/plugin-react';
3
+
4
+ export default defineConfig({
5
+ plugins: [pluginReact()],
6
+ });
@@ -0,0 +1,26 @@
1
+ body {
2
+ margin: 0;
3
+ color: #fff;
4
+ font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
5
+ background-image: linear-gradient(to bottom, #020917, #101725);
6
+ }
7
+
8
+ .content {
9
+ display: flex;
10
+ min-height: 100vh;
11
+ line-height: 1.1;
12
+ text-align: center;
13
+ flex-direction: column;
14
+ justify-content: center;
15
+ }
16
+
17
+ .content h1 {
18
+ font-size: 3.6rem;
19
+ font-weight: 700;
20
+ }
21
+
22
+ .content p {
23
+ font-size: 1.2rem;
24
+ font-weight: 400;
25
+ opacity: 0.5;
26
+ }
@@ -0,0 +1,12 @@
1
+ import './App.css';
2
+
3
+ const App = () => {
4
+ return (
5
+ <div className="content">
6
+ <h1>Rsbuild with React</h1>
7
+ <p>Start building amazing things with Rsbuild.</p>
8
+ </div>
9
+ );
10
+ };
11
+
12
+ export default App;
@@ -0,0 +1 @@
1
+ /// <reference types="@rsbuild/core/types" />
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import App from './App';
4
+
5
+ const rootEl = document.getElementById('root');
6
+ if (rootEl) {
7
+ const root = ReactDOM.createRoot(rootEl);
8
+ root.render(
9
+ <React.StrictMode>
10
+ <App />
11
+ </React.StrictMode>,
12
+ );
13
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": ["DOM", "ES2020"],
4
+ "jsx": "react-jsx",
5
+ "target": "ES2020",
6
+ "noEmit": true,
7
+ "skipLibCheck": true,
8
+ "useDefineForClassFields": true,
9
+
10
+ /* modules */
11
+ "module": "ESNext",
12
+ "isolatedModules": true,
13
+ "resolveJsonModule": true,
14
+ "moduleResolution": "bundler",
15
+ "allowImportingTsExtensions": true,
16
+
17
+ /* type checking */
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true
21
+ },
22
+ "include": ["src"]
23
+ }
@@ -9,11 +9,11 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "solid-js": "^1.9.4"
12
+ "solid-js": "^1.9.5"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.8",
16
- "@rsbuild/plugin-babel": "^1.0.3",
17
- "@rsbuild/plugin-solid": "^1.0.4"
15
+ "@rsbuild/core": "^1.2.11",
16
+ "@rsbuild/plugin-babel": "^1.0.4",
17
+ "@rsbuild/plugin-solid": "^1.0.5"
18
18
  }
19
19
  }
@@ -9,12 +9,12 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "solid-js": "^1.9.4"
12
+ "solid-js": "^1.9.5"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.8",
16
- "@rsbuild/plugin-babel": "^1.0.3",
17
- "@rsbuild/plugin-solid": "^1.0.4",
15
+ "@rsbuild/core": "^1.2.11",
16
+ "@rsbuild/plugin-babel": "^1.0.4",
17
+ "@rsbuild/plugin-solid": "^1.0.5",
18
18
  "typescript": "^5.7.3"
19
19
  }
20
20
  }
@@ -12,7 +12,7 @@
12
12
  "module": "ESNext",
13
13
  "isolatedModules": true,
14
14
  "resolveJsonModule": true,
15
- "moduleResolution": "Bundler",
15
+ "moduleResolution": "bundler",
16
16
  "allowImportingTsExtensions": true,
17
17
 
18
18
  /* type checking */
@@ -9,10 +9,10 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "svelte": "^5.20.1"
12
+ "svelte": "^5.20.2"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.8",
16
- "@rsbuild/plugin-svelte": "^1.0.7"
15
+ "@rsbuild/core": "^1.2.11",
16
+ "@rsbuild/plugin-svelte": "^1.0.8"
17
17
  }
18
18
  }
@@ -10,11 +10,11 @@
10
10
  "svelte-check": "svelte-check --tsconfig ./tsconfig.json"
11
11
  },
12
12
  "dependencies": {
13
- "svelte": "^5.20.1"
13
+ "svelte": "^5.20.2"
14
14
  },
15
15
  "devDependencies": {
16
- "@rsbuild/core": "^1.2.8",
17
- "@rsbuild/plugin-svelte": "^1.0.7",
16
+ "@rsbuild/core": "^1.2.11",
17
+ "@rsbuild/plugin-svelte": "^1.0.8",
18
18
  "svelte-check": "^4.1.4",
19
19
  "typescript": "^5.7.3"
20
20
  }
@@ -13,7 +13,7 @@
13
13
  "module": "ESNext",
14
14
  "isolatedModules": true,
15
15
  "resolveJsonModule": true,
16
- "moduleResolution": "Bundler",
16
+ "moduleResolution": "bundler",
17
17
  "allowImportingTsExtensions": true,
18
18
 
19
19
  /* type checking */
@@ -9,6 +9,6 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "devDependencies": {
12
- "@rsbuild/core": "^1.2.8"
12
+ "@rsbuild/core": "^1.2.11"
13
13
  }
14
14
  }
@@ -9,7 +9,7 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "devDependencies": {
12
- "@rsbuild/core": "^1.2.8",
12
+ "@rsbuild/core": "^1.2.11",
13
13
  "typescript": "^5.7.3"
14
14
  }
15
15
  }
@@ -8,7 +8,7 @@
8
8
 
9
9
  /* modules */
10
10
  "module": "ESNext",
11
- "moduleResolution": "Bundler",
11
+ "moduleResolution": "bundler",
12
12
  "isolatedModules": true,
13
13
  "resolveJsonModule": true,
14
14
  "allowImportingTsExtensions": true,
@@ -12,7 +12,7 @@
12
12
  "vue": "^2.7.16"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.8",
15
+ "@rsbuild/core": "^1.2.11",
16
16
  "@rsbuild/plugin-vue2": "^1.0.2"
17
17
  }
18
18
  }
@@ -12,7 +12,7 @@
12
12
  "vue": "^2.7.16"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.8",
15
+ "@rsbuild/core": "^1.2.11",
16
16
  "@rsbuild/plugin-vue2": "^1.0.2",
17
17
  "typescript": "^5.7.3"
18
18
  }
@@ -11,7 +11,7 @@
11
11
  "module": "ESNext",
12
12
  "isolatedModules": true,
13
13
  "resolveJsonModule": true,
14
- "moduleResolution": "Bundler",
14
+ "moduleResolution": "bundler",
15
15
  "allowImportingTsExtensions": true,
16
16
 
17
17
  /* type checking */
@@ -12,7 +12,7 @@
12
12
  "vue": "^3.5.13"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.8",
16
- "@rsbuild/plugin-vue": "^1.0.5"
15
+ "@rsbuild/core": "^1.2.11",
16
+ "@rsbuild/plugin-vue": "^1.0.6"
17
17
  }
18
18
  }
@@ -12,8 +12,8 @@
12
12
  "vue": "^3.5.13"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.8",
16
- "@rsbuild/plugin-vue": "^1.0.5",
15
+ "@rsbuild/core": "^1.2.11",
16
+ "@rsbuild/plugin-vue": "^1.0.6",
17
17
  "typescript": "^5.7.3"
18
18
  }
19
19
  }
@@ -12,7 +12,7 @@
12
12
  "module": "ESNext",
13
13
  "isolatedModules": true,
14
14
  "resolveJsonModule": true,
15
- "moduleResolution": "Bundler",
15
+ "moduleResolution": "bundler",
16
16
  "allowImportingTsExtensions": true,
17
17
 
18
18
  /* type checking */