create-rsbuild 0.3.0 → 0.3.2

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,13 @@
1
1
  # create-rsbuild
2
2
 
3
+ ## 0.3.2
4
+
5
+ ## 0.3.1
6
+
7
+ ### Patch Changes
8
+
9
+ - 7b877865: feat(create-rsbuild): add extensions config for Vue projects
10
+
3
11
  ## 0.3.0
4
12
 
5
13
  ## 0.2.18
package/dist/index.js CHANGED
@@ -75,6 +75,7 @@ async function main() {
75
75
  { value: "vue3", label: "Vue 3" },
76
76
  { value: "vue2", label: "Vue 2" },
77
77
  { value: "lit", label: "Lit" },
78
+ { value: "preact", label: "Preact" },
78
79
  { value: "svelte", label: "Svelte" },
79
80
  { value: "solid", label: "Solid" },
80
81
  { value: "vanilla", label: "Vanilla" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rsbuild",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Create a new Rsbuild project",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -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,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
+ }
@@ -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
  }
@@ -9,7 +9,8 @@
9
9
  "skipLibCheck": true,
10
10
  "isolatedModules": true,
11
11
  "resolveJsonModule": true,
12
- "moduleResolution": "bundler"
12
+ "moduleResolution": "bundler",
13
+ "useDefineForClassFields": true
13
14
  },
14
15
  "include": ["src"]
15
16
  }
@@ -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
  }
@@ -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
  }
@@ -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,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
+ }
@@ -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
- }
@@ -9,7 +9,8 @@
9
9
  "skipLibCheck": true,
10
10
  "isolatedModules": true,
11
11
  "resolveJsonModule": true,
12
- "moduleResolution": "bundler"
12
+ "moduleResolution": "bundler",
13
+ "useDefineForClassFields": true
13
14
  },
14
15
  "include": ["src"]
15
16
  }