create-rsbuild 0.0.0-nightly-20231111160817 → 0.0.0-nightly-20240114070311

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 (62) hide show
  1. package/CHANGELOG.md +25 -27
  2. package/README.md +1 -1
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +32 -9
  5. package/package.json +5 -4
  6. package/template-lit-js/package.json +14 -0
  7. package/template-lit-js/rsbuild.config.mjs +7 -0
  8. package/template-lit-js/src/index.css +6 -0
  9. package/template-lit-js/src/index.html +5 -0
  10. package/template-lit-js/src/index.js +4 -0
  11. package/template-lit-js/src/my-element.js +34 -0
  12. package/template-lit-ts/package.json +15 -0
  13. package/template-lit-ts/rsbuild.config.ts +7 -0
  14. package/template-lit-ts/src/env.d.ts +1 -0
  15. package/template-lit-ts/src/index.css +6 -0
  16. package/template-lit-ts/src/index.html +5 -0
  17. package/template-lit-ts/src/index.ts +4 -0
  18. package/template-lit-ts/src/my-element.ts +34 -0
  19. package/template-lit-ts/tsconfig.json +14 -0
  20. package/template-preact-js/package.json +17 -0
  21. package/template-preact-js/rsbuild.config.mjs +6 -0
  22. package/template-preact-js/src/App.css +26 -0
  23. package/template-preact-js/src/App.jsx +12 -0
  24. package/template-preact-js/src/index.jsx +4 -0
  25. package/template-preact-ts/package.json +18 -0
  26. package/template-preact-ts/rsbuild.config.ts +6 -0
  27. package/template-preact-ts/src/App.css +26 -0
  28. package/template-preact-ts/src/App.tsx +12 -0
  29. package/template-preact-ts/src/index.tsx +4 -0
  30. package/template-preact-ts/tsconfig.json +20 -0
  31. package/template-react-ts/package.json +3 -3
  32. package/template-react-ts/tsconfig.json +2 -1
  33. package/template-solid-js/package.json +18 -0
  34. package/template-solid-js/rsbuild.config.mjs +13 -0
  35. package/template-solid-js/src/App.css +26 -0
  36. package/template-solid-js/src/App.jsx +12 -0
  37. package/template-solid-js/src/index.jsx +4 -0
  38. package/template-solid-ts/package.json +19 -0
  39. package/template-solid-ts/rsbuild.config.ts +13 -0
  40. package/template-solid-ts/src/App.css +26 -0
  41. package/template-solid-ts/src/App.tsx +12 -0
  42. package/template-solid-ts/src/env.d.ts +1 -0
  43. package/template-solid-ts/src/index.tsx +4 -0
  44. package/template-solid-ts/tsconfig.json +16 -0
  45. package/template-svelte-ts/package.json +1 -1
  46. package/template-svelte-ts/tsconfig.json +2 -1
  47. package/template-vanilla-js/package.json +13 -0
  48. package/template-vanilla-js/rsbuild.config.mjs +3 -0
  49. package/template-vanilla-js/src/index.css +26 -0
  50. package/template-vanilla-js/src/index.js +8 -0
  51. package/template-vanilla-ts/package.json +14 -0
  52. package/template-vanilla-ts/rsbuild.config.ts +3 -0
  53. package/template-vanilla-ts/src/index.css +26 -0
  54. package/template-vanilla-ts/src/index.ts +8 -0
  55. package/template-vanilla-ts/tsconfig.json +14 -0
  56. package/template-vue2-ts/package.json +1 -1
  57. package/template-vue2-ts/tsconfig.json +3 -1
  58. package/template-vue3-js/.vscode/extensions.json +3 -0
  59. package/template-vue3-ts/.vscode/extensions.json +3 -0
  60. package/template-vue3-ts/package.json +1 -1
  61. package/template-vue3-ts/src/env.d.ts +0 -7
  62. package/template-vue3-ts/tsconfig.json +4 -1
package/CHANGELOG.md CHANGED
@@ -1,53 +1,51 @@
1
1
  # create-rsbuild
2
2
 
3
- ## 0.0.0-nightly-20231111160817
3
+ ## 0.0.0-nightly-20240114070311
4
4
 
5
- ## 0.0.19
5
+ ## 0.3.2
6
6
 
7
- ## 0.0.18
7
+ ## 0.3.1
8
8
 
9
9
  ### Patch Changes
10
10
 
11
- - 6f1c4a1: feat: add builtin assets and CSS modules types
12
- - eed4dcb: feat(create-rsbuild): update all pages in templates
13
- - a4485ea: feat(create-rspack): add dev --open option by default
11
+ - 7b877865: feat(create-rsbuild): add extensions config for Vue projects
14
12
 
15
- ## 0.0.17
13
+ ## 0.3.0
16
14
 
17
- ## 0.0.16
15
+ ## 0.2.18
18
16
 
19
- ### Patch Changes
17
+ ## 0.2.17
20
18
 
21
- - 9a52542: feat: add default meta configs and simplify the templates
19
+ ## 0.2.16
22
20
 
23
- ## 0.0.15
21
+ ## 0.2.15
24
22
 
25
- ## 0.0.14
23
+ ## 0.2.14
26
24
 
27
- ## 0.0.13
25
+ ## 0.2.13
28
26
 
29
- ## 0.0.12
27
+ ## 0.2.12
30
28
 
31
- ### Patch Changes
29
+ ## 0.2.11
32
30
 
33
- - 50c2711: feat(create-rsbuild): always use the latest version
31
+ ## 0.2.10
34
32
 
35
- ## 0.0.11
33
+ ## 0.2.9
36
34
 
37
- ### Patch Changes
35
+ ## 0.2.8
38
36
 
39
- - 8a4cf1e: fix(create-rsbuild): incorrect preview command
40
- - db6b547: feat(create-rsbuild): templates depend on latest version of Rsbuild
37
+ ## 0.2.7
41
38
 
42
- ## 0.0.10
39
+ ## 0.2.6
43
40
 
44
- ### Patch Changes
41
+ ## 0.2.5
45
42
 
46
- - 3d261af: fix(create-rsbuild): failed to publish tsconfig of templates
43
+ ## 0.2.4
47
44
 
48
- ## 0.0.9
45
+ ## 0.2.3
49
46
 
50
- ### Patch Changes
47
+ ## 0.2.2
48
+
49
+ ## 0.2.1
51
50
 
52
- - 0fbab50: fix(create-rsbuild): failed to resolve the templates
53
- - e6be3a5: fix(create-rspack): skip local files for debugging
51
+ ## 0.2.0
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # Rsbuild
6
6
 
7
- Unleash the power of Rspack with the out-of-the-box build tool.
7
+ The Rspack-based build tool. It's fast, out-of-the-box and extensible.
8
8
 
9
9
  ## Documentation
10
10
 
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export {};
2
+ export {};
package/dist/index.js CHANGED
@@ -35,10 +35,22 @@ function checkCancel(value) {
35
35
  function formatTargetDir(targetDir) {
36
36
  return targetDir.trim().replace(/\/+$/g, "");
37
37
  }
38
+ function pkgFromUserAgent(userAgent) {
39
+ if (!userAgent)
40
+ return void 0;
41
+ const pkgSpec = userAgent.split(" ")[0];
42
+ const pkgSpecArr = pkgSpec.split("/");
43
+ return {
44
+ name: pkgSpecArr[0],
45
+ version: pkgSpecArr[1]
46
+ };
47
+ }
38
48
  async function main() {
39
49
  console.log("");
40
50
  import_rslog.logger.greet("◆ Create Rsbuild Project");
41
51
  const cwd = process.cwd();
52
+ const pkgInfo = pkgFromUserAgent(process.env.npm_config_user_agent);
53
+ const pkgManager = pkgInfo ? pkgInfo.name : "npm";
42
54
  const packageRoot = import_path.default.resolve(__dirname, "..");
43
55
  const packageJsonPath = import_path.default.join(packageRoot, "package.json");
44
56
  const { version } = require(packageJsonPath);
@@ -47,7 +59,7 @@ async function main() {
47
59
  placeholder: "my-project",
48
60
  validate(value) {
49
61
  if (value.length === 0) {
50
- return `Target folder is required`;
62
+ return "Target folder is required";
51
63
  }
52
64
  if (import_fs.default.existsSync(import_path.default.join(cwd, value))) {
53
65
  return `"${value}" is not empty, please input another folder`;
@@ -62,7 +74,11 @@ async function main() {
62
74
  { value: "react", label: "React" },
63
75
  { value: "vue3", label: "Vue 3" },
64
76
  { value: "vue2", label: "Vue 2" },
65
- { value: "svelte", label: "Svelte" }
77
+ { value: "lit", label: "Lit" },
78
+ { value: "preact", label: "Preact" },
79
+ { value: "svelte", label: "Svelte" },
80
+ { value: "solid", label: "Solid" },
81
+ { value: "vanilla", label: "Vanilla" }
66
82
  ]
67
83
  });
68
84
  checkCancel(framework);
@@ -75,15 +91,19 @@ async function main() {
75
91
  });
76
92
  checkCancel(language);
77
93
  const srcFolder = import_path.default.join(packageRoot, `template-${framework}-${language}`);
78
- const commonFolder = import_path.default.join(packageRoot, `template-common`);
94
+ const commonFolder = import_path.default.join(packageRoot, "template-common");
79
95
  const distFolder = import_path.default.join(cwd, targetDir);
80
96
  copyFolder(commonFolder, distFolder, version);
81
- copyFolder(srcFolder, distFolder, version);
82
- const nextSteps = [`cd ${targetDir}`, "npm i", "npm run dev"];
97
+ copyFolder(srcFolder, distFolder, version, import_path.default.basename(targetDir));
98
+ const nextSteps = [
99
+ `cd ${targetDir}`,
100
+ `${pkgManager} i`,
101
+ `${pkgManager} run dev`
102
+ ];
83
103
  (0, import_prompts.note)(nextSteps.join("\n"), "Next steps");
84
104
  (0, import_prompts.outro)("Done.");
85
105
  }
86
- function copyFolder(src, dist, version) {
106
+ function copyFolder(src, dist, version, name) {
87
107
  const renameFiles = {
88
108
  gitignore: ".gitignore"
89
109
  };
@@ -101,14 +121,17 @@ function copyFolder(src, dist, version) {
101
121
  } else {
102
122
  import_fs.default.copyFileSync(srcFile, distFile);
103
123
  if (file === "package.json") {
104
- replaceVersion(distFile, version);
124
+ updatePackageJson(distFile, version, name);
105
125
  }
106
126
  }
107
127
  }
108
128
  }
109
- const replaceVersion = (pkgJsonPath, version) => {
129
+ const updatePackageJson = (pkgJsonPath, version, name) => {
110
130
  let content = import_fs.default.readFileSync(pkgJsonPath, "utf-8");
111
131
  content = content.replace(/workspace:\*/g, `^${version}`);
112
- import_fs.default.writeFileSync(pkgJsonPath, content);
132
+ const pkg = JSON.parse(content);
133
+ if (name)
134
+ pkg.name = name;
135
+ import_fs.default.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 2));
113
136
  };
114
137
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rsbuild",
3
- "version": "0.0.0-nightly-20231111160817",
3
+ "version": "0.0.0-nightly-20240114070311",
4
4
  "description": "Create a new Rsbuild project",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -9,6 +9,7 @@
9
9
  "directory": "packages/create-rsbuild"
10
10
  },
11
11
  "license": "MIT",
12
+ "type": "commonjs",
12
13
  "exports": {
13
14
  ".": {
14
15
  "types": "./dist/index.d.ts",
@@ -22,11 +23,11 @@
22
23
  },
23
24
  "dependencies": {
24
25
  "@clack/prompts": "^0.7.0",
25
- "rslog": "^1.1.0"
26
+ "rslog": "^1.2.0"
26
27
  },
27
28
  "devDependencies": {
28
- "@types/node": "^16",
29
- "typescript": "^5.2.2"
29
+ "@types/node": "16.x",
30
+ "typescript": "^5.3.0"
30
31
  },
31
32
  "publishConfig": {
32
33
  "access": "public",
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "rsbuild-lit-js",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "dev": "rsbuild dev --open",
7
+ "build": "rsbuild build",
8
+ "preview": "rsbuild preview"
9
+ },
10
+ "devDependencies": {
11
+ "@rsbuild/core": "workspace:*",
12
+ "lit": "^3.0.2"
13
+ }
14
+ }
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+
3
+ export default defineConfig({
4
+ html: {
5
+ template: './src/index.html',
6
+ },
7
+ });
@@ -0,0 +1,6 @@
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
+ }
@@ -0,0 +1,5 @@
1
+ <!doctype html>
2
+ <head></head>
3
+ <body>
4
+ <my-element />
5
+ </body>
@@ -0,0 +1,4 @@
1
+ import './index.css';
2
+ import { MyElement } from './my-element';
3
+
4
+ customElements.define('my-element', MyElement);
@@ -0,0 +1,34 @@
1
+ import { html, css, LitElement } from 'lit';
2
+
3
+ export class MyElement extends LitElement {
4
+ static styles = css`
5
+ .content {
6
+ display: flex;
7
+ min-height: 100vh;
8
+ line-height: 1.1;
9
+ text-align: center;
10
+ flex-direction: column;
11
+ justify-content: center;
12
+ }
13
+
14
+ .content h1 {
15
+ font-size: 3.6rem;
16
+ font-weight: 700;
17
+ }
18
+
19
+ .content p {
20
+ font-size: 1.2rem;
21
+ font-weight: 400;
22
+ opacity: 0.5;
23
+ }
24
+ `;
25
+
26
+ render() {
27
+ return html`
28
+ <div class="content">
29
+ <h1>Rsbuild with Lit</h1>
30
+ <p>Start building amazing things with Rsbuild.</p>
31
+ </div>
32
+ `;
33
+ }
34
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "rsbuild-lit-ts",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "dev": "rsbuild dev --open",
7
+ "build": "rsbuild build",
8
+ "preview": "rsbuild preview"
9
+ },
10
+ "devDependencies": {
11
+ "@rsbuild/core": "workspace:*",
12
+ "lit": "^3.0.2",
13
+ "typescript": "^5.3.0"
14
+ }
15
+ }
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+
3
+ export default defineConfig({
4
+ html: {
5
+ template: './src/index.html',
6
+ },
7
+ });
@@ -0,0 +1 @@
1
+ /// <reference types="@rsbuild/core/types" />
@@ -0,0 +1,6 @@
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
+ }
@@ -0,0 +1,5 @@
1
+ <!doctype html>
2
+ <head></head>
3
+ <body>
4
+ <my-element />
5
+ </body>
@@ -0,0 +1,4 @@
1
+ import './index.css';
2
+ import { MyElement } from './my-element';
3
+
4
+ customElements.define('my-element', MyElement);
@@ -0,0 +1,34 @@
1
+ import { html, css, LitElement } from 'lit';
2
+
3
+ export class MyElement extends LitElement {
4
+ static styles = css`
5
+ .content {
6
+ display: flex;
7
+ min-height: 100vh;
8
+ line-height: 1.1;
9
+ text-align: center;
10
+ flex-direction: column;
11
+ justify-content: center;
12
+ }
13
+
14
+ .content h1 {
15
+ font-size: 3.6rem;
16
+ font-weight: 700;
17
+ }
18
+
19
+ .content p {
20
+ font-size: 1.2rem;
21
+ font-weight: 400;
22
+ opacity: 0.5;
23
+ }
24
+ `;
25
+
26
+ render() {
27
+ return html`
28
+ <div class="content">
29
+ <h1>Rsbuild with Lit</h1>
30
+ <p>Start building amazing things with Rsbuild.</p>
31
+ </div>
32
+ `;
33
+ }
34
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "lib": ["DOM", "ES2020"],
5
+ "module": "ESNext",
6
+ "strict": true,
7
+ "skipLibCheck": true,
8
+ "isolatedModules": true,
9
+ "resolveJsonModule": true,
10
+ "moduleResolution": "bundler",
11
+ "useDefineForClassFields": true
12
+ },
13
+ "include": ["src"]
14
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "rsbuild-preact-js",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "dev": "rsbuild dev --open",
7
+ "build": "rsbuild build",
8
+ "preview": "rsbuild preview"
9
+ },
10
+ "dependencies": {
11
+ "preact": "^10.19.3"
12
+ },
13
+ "devDependencies": {
14
+ "@rsbuild/core": "workspace:*",
15
+ "@rsbuild/plugin-preact": "workspace:*"
16
+ }
17
+ }
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+ import { pluginPreact } from '@rsbuild/plugin-preact';
3
+
4
+ export default defineConfig({
5
+ plugins: [pluginPreact()],
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 Preact</h1>
7
+ <p>Start building amazing things with Rsbuild.</p>
8
+ </div>
9
+ );
10
+ };
11
+
12
+ export default App;
@@ -0,0 +1,4 @@
1
+ import { render } from 'preact';
2
+ import App from './App';
3
+
4
+ render(<App />, document.getElementById('root'));
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "rsbuild-preact-ts",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "dev": "rsbuild dev --open",
7
+ "build": "rsbuild build",
8
+ "preview": "rsbuild preview"
9
+ },
10
+ "dependencies": {
11
+ "preact": "^10.19.3"
12
+ },
13
+ "devDependencies": {
14
+ "@rsbuild/core": "workspace:*",
15
+ "@rsbuild/plugin-preact": "workspace:*",
16
+ "typescript": "^5.3.0"
17
+ }
18
+ }
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+ import { pluginPreact } from '@rsbuild/plugin-preact';
3
+
4
+ export default defineConfig({
5
+ plugins: [pluginPreact()],
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 Preact</h1>
7
+ <p>Start building amazing things with Rsbuild.</p>
8
+ </div>
9
+ );
10
+ };
11
+
12
+ export default App;
@@ -0,0 +1,4 @@
1
+ import { render } from 'preact';
2
+ import App from './App';
3
+
4
+ render(<App />, document.getElementById('root')!);
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "lib": ["DOM", "ES2020"],
5
+ "module": "ESNext",
6
+ "jsx": "react-jsx",
7
+ "jsxImportSource": "preact",
8
+ "strict": true,
9
+ "skipLibCheck": true,
10
+ "isolatedModules": true,
11
+ "resolveJsonModule": true,
12
+ "moduleResolution": "bundler",
13
+ "useDefineForClassFields": true,
14
+ "paths": {
15
+ "react": ["./node_modules/preact/compat/"],
16
+ "react-dom": ["./node_modules/preact/compat/"]
17
+ }
18
+ },
19
+ "include": ["src"]
20
+ }
@@ -14,8 +14,8 @@
14
14
  "devDependencies": {
15
15
  "@rsbuild/core": "workspace:*",
16
16
  "@rsbuild/plugin-react": "workspace:*",
17
- "@types/react": "^18",
18
- "@types/react-dom": "^18",
19
- "typescript": "^5.2.2"
17
+ "@types/react": "^18.2.47",
18
+ "@types/react-dom": "^18.2.18",
19
+ "typescript": "^5.3.0"
20
20
  }
21
21
  }
@@ -8,7 +8,8 @@
8
8
  "skipLibCheck": true,
9
9
  "isolatedModules": true,
10
10
  "resolveJsonModule": true,
11
- "moduleResolution": "bundler"
11
+ "moduleResolution": "bundler",
12
+ "useDefineForClassFields": true
12
13
  },
13
14
  "include": ["src"]
14
15
  }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "rsbuild-solid-js",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "dev": "rsbuild dev --open",
7
+ "build": "rsbuild build",
8
+ "preview": "rsbuild preview"
9
+ },
10
+ "dependencies": {
11
+ "solid-js": "^1.8.5"
12
+ },
13
+ "devDependencies": {
14
+ "@rsbuild/core": "workspace:*",
15
+ "@rsbuild/plugin-babel": "workspace:*",
16
+ "@rsbuild/plugin-solid": "workspace:*"
17
+ }
18
+ }
@@ -0,0 +1,13 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+ import { pluginBabel } from '@rsbuild/plugin-babel';
3
+ import { pluginSolid } from '@rsbuild/plugin-solid';
4
+
5
+ export default defineConfig({
6
+ plugins: [
7
+ pluginBabel({
8
+ include: /\.(?:jsx|tsx)$/,
9
+ exclude: /[\\/]node_modules[\\/]/,
10
+ }),
11
+ pluginSolid(),
12
+ ],
13
+ });
@@ -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 class="content">
6
+ <h1>Rsbuild with Solid</h1>
7
+ <p>Start building amazing things with Rsbuild.</p>
8
+ </div>
9
+ );
10
+ };
11
+
12
+ export default App;
@@ -0,0 +1,4 @@
1
+ import { render } from 'solid-js/web';
2
+ import App from './App';
3
+
4
+ render(() => <App />, document.getElementById('root'));
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "rsbuild-solid-ts",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "dev": "rsbuild dev --open",
7
+ "build": "rsbuild build",
8
+ "preview": "rsbuild preview"
9
+ },
10
+ "dependencies": {
11
+ "solid-js": "^1.8.5"
12
+ },
13
+ "devDependencies": {
14
+ "@rsbuild/core": "workspace:*",
15
+ "@rsbuild/plugin-babel": "workspace:*",
16
+ "@rsbuild/plugin-solid": "workspace:*",
17
+ "typescript": "^5.3.0"
18
+ }
19
+ }
@@ -0,0 +1,13 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+ import { pluginBabel } from '@rsbuild/plugin-babel';
3
+ import { pluginSolid } from '@rsbuild/plugin-solid';
4
+
5
+ export default defineConfig({
6
+ plugins: [
7
+ pluginBabel({
8
+ include: /\.(?:jsx|tsx)$/,
9
+ exclude: /[\\/]node_modules[\\/]/,
10
+ }),
11
+ pluginSolid(),
12
+ ],
13
+ });
@@ -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 class="content">
6
+ <h1>Rsbuild with Solid</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,4 @@
1
+ import { render } from 'solid-js/web';
2
+ import App from './App';
3
+
4
+ render(() => <App />, document.getElementById('root')!);
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "lib": ["DOM", "ES2020"],
5
+ "module": "ESNext",
6
+ "jsx": "preserve",
7
+ "jsxImportSource": "solid-js",
8
+ "strict": true,
9
+ "skipLibCheck": true,
10
+ "isolatedModules": true,
11
+ "resolveJsonModule": true,
12
+ "moduleResolution": "bundler",
13
+ "useDefineForClassFields": true
14
+ },
15
+ "include": ["src"]
16
+ }
@@ -13,6 +13,6 @@
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
15
15
  "@rsbuild/plugin-svelte": "workspace:*",
16
- "typescript": "^5.2.2"
16
+ "typescript": "^5.3.0"
17
17
  }
18
18
  }
@@ -7,7 +7,8 @@
7
7
  "skipLibCheck": true,
8
8
  "isolatedModules": true,
9
9
  "resolveJsonModule": true,
10
- "moduleResolution": "bundler"
10
+ "moduleResolution": "bundler",
11
+ "useDefineForClassFields": true
11
12
  },
12
13
  "include": ["src"]
13
14
  }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "rsbuild-vanilla-js",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "dev": "rsbuild dev --open",
7
+ "build": "rsbuild build",
8
+ "preview": "rsbuild preview"
9
+ },
10
+ "devDependencies": {
11
+ "@rsbuild/core": "workspace:*"
12
+ }
13
+ }
@@ -0,0 +1,3 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+
3
+ export default defineConfig({});
@@ -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,8 @@
1
+ import './index.css';
2
+
3
+ document.querySelector('#root').innerHTML = `
4
+ <div class="content">
5
+ <h1>Vanilla Rsbuild</h1>
6
+ <p>Start building amazing things with Rsbuild.</p>
7
+ </div>
8
+ `;
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "rsbuild-vanilla-ts",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "dev": "rsbuild dev --open",
7
+ "build": "rsbuild build",
8
+ "preview": "rsbuild preview"
9
+ },
10
+ "devDependencies": {
11
+ "@rsbuild/core": "workspace:*",
12
+ "typescript": "^5.3.0"
13
+ }
14
+ }
@@ -0,0 +1,3 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+
3
+ export default defineConfig({});
@@ -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,8 @@
1
+ import './index.css';
2
+
3
+ document.querySelector('#root')!.innerHTML = `
4
+ <div class="content">
5
+ <h1>Vanilla Rsbuild</h1>
6
+ <p>Start building amazing things with Rsbuild.</p>
7
+ </div>
8
+ `;
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "lib": ["DOM", "ES2020"],
5
+ "module": "ESNext",
6
+ "strict": true,
7
+ "skipLibCheck": true,
8
+ "isolatedModules": true,
9
+ "resolveJsonModule": true,
10
+ "moduleResolution": "bundler",
11
+ "useDefineForClassFields": true
12
+ },
13
+ "include": ["src"]
14
+ }
@@ -13,6 +13,6 @@
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
15
15
  "@rsbuild/plugin-vue2": "workspace:*",
16
- "typescript": "^5.2.2"
16
+ "typescript": "^5.3.0"
17
17
  }
18
18
  }
@@ -3,11 +3,13 @@
3
3
  "target": "ES2020",
4
4
  "lib": ["DOM", "ES2020"],
5
5
  "module": "ESNext",
6
+ "jsx": "preserve",
6
7
  "strict": true,
7
8
  "skipLibCheck": true,
8
9
  "isolatedModules": true,
9
10
  "resolveJsonModule": true,
10
- "moduleResolution": "bundler"
11
+ "moduleResolution": "bundler",
12
+ "useDefineForClassFields": true
11
13
  },
12
14
  "include": ["src"]
13
15
  }
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
3
+ }
@@ -13,6 +13,6 @@
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
15
15
  "@rsbuild/plugin-vue": "workspace:*",
16
- "typescript": "^5.2.2"
16
+ "typescript": "^5.3.0"
17
17
  }
18
18
  }
@@ -1,8 +1 @@
1
1
  /// <reference types="@rsbuild/core/types" />
2
-
3
- declare module '*.vue' {
4
- import type { DefineComponent } from 'vue';
5
-
6
- const component: DefineComponent<{}, {}, any>;
7
- export default component;
8
- }
@@ -3,11 +3,14 @@
3
3
  "target": "ES2020",
4
4
  "lib": ["DOM", "ES2020"],
5
5
  "module": "ESNext",
6
+ "jsx": "preserve",
7
+ "jsxImportSource": "vue",
6
8
  "strict": true,
7
9
  "skipLibCheck": true,
8
10
  "isolatedModules": true,
9
11
  "resolveJsonModule": true,
10
- "moduleResolution": "bundler"
12
+ "moduleResolution": "bundler",
13
+ "useDefineForClassFields": true
11
14
  },
12
15
  "include": ["src"]
13
16
  }