create-rsbuild 1.0.0 → 1.0.1-beta.1

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 (72) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +1546 -67
  3. package/package.json +15 -6
  4. package/template-biome/biome.json +25 -0
  5. package/template-biome/package.json +12 -0
  6. package/template-eslint/common-js/eslint.config.mjs +8 -0
  7. package/template-eslint/common-js/package.json +13 -0
  8. package/template-eslint/common-ts/eslint.config.mjs +10 -0
  9. package/template-eslint/common-ts/package.json +14 -0
  10. package/template-eslint/react-js/eslint.config.mjs +29 -0
  11. package/template-eslint/react-js/package.json +16 -0
  12. package/template-eslint/react-ts/eslint.config.mjs +31 -0
  13. package/template-eslint/react-ts/package.json +17 -0
  14. package/template-eslint/svelte-js/eslint.config.mjs +20 -0
  15. package/template-eslint/svelte-js/package.json +14 -0
  16. package/template-eslint/svelte-ts/eslint.config.mjs +28 -0
  17. package/template-eslint/svelte-ts/package.json +16 -0
  18. package/template-eslint/vue-js/eslint.config.mjs +10 -0
  19. package/template-eslint/vue-js/package.json +14 -0
  20. package/template-eslint/vue-ts/eslint.config.mjs +12 -0
  21. package/template-eslint/vue-ts/package.json +15 -0
  22. package/template-lit-js/package.json +4 -2
  23. package/template-lit-ts/package.json +4 -2
  24. package/template-lit-ts/tsconfig.json +4 -1
  25. package/template-preact-js/package.json +17 -0
  26. package/template-preact-js/rsbuild.config.mjs +6 -0
  27. package/template-preact-js/src/App.css +26 -0
  28. package/template-preact-js/src/App.jsx +12 -0
  29. package/template-preact-js/src/index.jsx +4 -0
  30. package/template-preact-ts/package.json +18 -0
  31. package/template-preact-ts/rsbuild.config.ts +6 -0
  32. package/template-preact-ts/src/App.css +26 -0
  33. package/template-preact-ts/src/App.tsx +12 -0
  34. package/template-preact-ts/src/index.tsx +7 -0
  35. package/template-preact-ts/tsconfig.json +22 -0
  36. package/template-prettier/.prettierignore +4 -0
  37. package/template-prettier/.prettierrc +3 -0
  38. package/template-prettier/package.json +11 -0
  39. package/template-react-js/package.json +2 -2
  40. package/template-react-ts/package.json +5 -5
  41. package/template-react-ts/src/index.tsx +9 -6
  42. package/template-react-ts/tsconfig.json +4 -1
  43. package/template-solid-js/package.json +1 -1
  44. package/template-solid-js/rsbuild.config.mjs +6 -1
  45. package/template-solid-js/src/index.jsx +1 -1
  46. package/template-solid-ts/package.json +2 -2
  47. package/template-solid-ts/rsbuild.config.ts +6 -1
  48. package/template-solid-ts/src/index.tsx +4 -1
  49. package/template-solid-ts/tsconfig.json +4 -1
  50. package/template-svelte-js/package.json +1 -1
  51. package/template-svelte-js/src/index.js +1 -4
  52. package/template-svelte-ts/package.json +5 -3
  53. package/template-svelte-ts/src/index.ts +1 -4
  54. package/template-svelte-ts/tsconfig.json +7 -1
  55. package/template-vanilla-ts/package.json +1 -1
  56. package/template-vanilla-ts/tsconfig.json +4 -1
  57. package/template-vue2-js/src/index.js +1 -1
  58. package/template-vue2-ts/package.json +1 -1
  59. package/template-vue2-ts/src/index.ts +1 -1
  60. package/template-vue2-ts/tsconfig.json +5 -1
  61. package/template-vue3-js/.vscode/extensions.json +3 -0
  62. package/template-vue3-js/package.json +1 -1
  63. package/template-vue3-js/src/index.js +1 -1
  64. package/template-vue3-ts/.vscode/extensions.json +3 -0
  65. package/template-vue3-ts/package.json +2 -2
  66. package/template-vue3-ts/src/env.d.ts +1 -0
  67. package/template-vue3-ts/src/index.ts +1 -1
  68. package/template-vue3-ts/tsconfig.json +6 -1
  69. package/CHANGELOG.md +0 -86
  70. package/dist/index.d.ts +0 -2
  71. package/modern.config.ts +0 -3
  72. package/tsconfig.json +0 -8
@@ -2,9 +2,12 @@ import React from 'react';
2
2
  import ReactDOM from 'react-dom/client';
3
3
  import App from './App';
4
4
 
5
- const root = ReactDOM.createRoot(document.getElementById('root')!);
6
- root.render(
7
- <React.StrictMode>
8
- <App />
9
- </React.StrictMode>,
10
- );
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
+ }
@@ -4,11 +4,14 @@
4
4
  "lib": ["DOM", "ES2020"],
5
5
  "module": "ESNext",
6
6
  "jsx": "react-jsx",
7
+ "noEmit": true,
7
8
  "strict": true,
8
9
  "skipLibCheck": true,
9
10
  "isolatedModules": true,
10
11
  "resolveJsonModule": true,
11
- "moduleResolution": "bundler"
12
+ "moduleResolution": "bundler",
13
+ "useDefineForClassFields": true,
14
+ "allowImportingTsExtensions": true
12
15
  },
13
16
  "include": ["src"]
14
17
  }
@@ -8,7 +8,7 @@
8
8
  "preview": "rsbuild preview"
9
9
  },
10
10
  "dependencies": {
11
- "solid-js": "^1.8.5"
11
+ "solid-js": "^1.8.18"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
@@ -3,5 +3,10 @@ import { pluginBabel } from '@rsbuild/plugin-babel';
3
3
  import { pluginSolid } from '@rsbuild/plugin-solid';
4
4
 
5
5
  export default defineConfig({
6
- plugins: [pluginBabel(), pluginSolid()],
6
+ plugins: [
7
+ pluginBabel({
8
+ include: /\.(?:jsx|tsx)$/,
9
+ }),
10
+ pluginSolid(),
11
+ ],
7
12
  });
@@ -1,4 +1,4 @@
1
1
  import { render } from 'solid-js/web';
2
2
  import App from './App';
3
3
 
4
- render(App, document.getElementById('root'));
4
+ render(() => <App />, document.getElementById('root'));
@@ -8,12 +8,12 @@
8
8
  "preview": "rsbuild preview"
9
9
  },
10
10
  "dependencies": {
11
- "solid-js": "^1.8.5"
11
+ "solid-js": "^1.8.18"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
15
15
  "@rsbuild/plugin-babel": "workspace:*",
16
16
  "@rsbuild/plugin-solid": "workspace:*",
17
- "typescript": "^5.3.0"
17
+ "typescript": "^5.5.2"
18
18
  }
19
19
  }
@@ -3,5 +3,10 @@ import { pluginBabel } from '@rsbuild/plugin-babel';
3
3
  import { pluginSolid } from '@rsbuild/plugin-solid';
4
4
 
5
5
  export default defineConfig({
6
- plugins: [pluginBabel(), pluginSolid()],
6
+ plugins: [
7
+ pluginBabel({
8
+ include: /\.(?:jsx|tsx)$/,
9
+ }),
10
+ pluginSolid(),
11
+ ],
7
12
  });
@@ -1,4 +1,7 @@
1
1
  import { render } from 'solid-js/web';
2
2
  import App from './App';
3
3
 
4
- render(App, document.getElementById('root')!);
4
+ const root = document.getElementById('root');
5
+ if (root) {
6
+ render(() => <App />, root);
7
+ }
@@ -5,11 +5,14 @@
5
5
  "module": "ESNext",
6
6
  "jsx": "preserve",
7
7
  "jsxImportSource": "solid-js",
8
+ "noEmit": true,
8
9
  "strict": true,
9
10
  "skipLibCheck": true,
10
11
  "isolatedModules": true,
11
12
  "resolveJsonModule": true,
12
- "moduleResolution": "bundler"
13
+ "moduleResolution": "bundler",
14
+ "useDefineForClassFields": true,
15
+ "allowImportingTsExtensions": true
13
16
  },
14
17
  "include": ["src"]
15
18
  }
@@ -8,7 +8,7 @@
8
8
  "preview": "rsbuild preview"
9
9
  },
10
10
  "dependencies": {
11
- "svelte": "^4.2.2"
11
+ "svelte": "^4.2.18"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
@@ -1,11 +1,8 @@
1
- import './index.css';
2
1
  import App from './App.svelte';
2
+ import './index.css';
3
3
 
4
4
  const app = new App({
5
5
  target: document.body,
6
- props: {
7
- name: 'world',
8
- },
9
6
  });
10
7
 
11
8
  export default app;
@@ -5,14 +5,16 @@
5
5
  "scripts": {
6
6
  "dev": "rsbuild dev --open",
7
7
  "build": "rsbuild build",
8
- "preview": "rsbuild preview"
8
+ "preview": "rsbuild preview",
9
+ "svelte-check": "svelte-check --tsconfig ./tsconfig.json"
9
10
  },
10
11
  "dependencies": {
11
- "svelte": "^4.2.2"
12
+ "svelte": "^4.2.18"
12
13
  },
13
14
  "devDependencies": {
14
15
  "@rsbuild/core": "workspace:*",
15
16
  "@rsbuild/plugin-svelte": "workspace:*",
16
- "typescript": "^5.3.0"
17
+ "svelte-check": "^3.8.4",
18
+ "typescript": "^5.5.2"
17
19
  }
18
20
  }
@@ -1,11 +1,8 @@
1
- import './index.css';
2
1
  import App from './App.svelte';
2
+ import './index.css';
3
3
 
4
4
  const app = new App({
5
5
  target: document.body,
6
- props: {
7
- name: 'world',
8
- },
9
6
  });
10
7
 
11
8
  export default app;
@@ -3,11 +3,17 @@
3
3
  "target": "ES2020",
4
4
  "lib": ["DOM", "ES2020"],
5
5
  "module": "ESNext",
6
+ "noEmit": true,
6
7
  "strict": true,
7
8
  "skipLibCheck": true,
9
+ // svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
10
+ // to enforce using `import type` instead of `import` for Types.
11
+ "verbatimModuleSyntax": true,
8
12
  "isolatedModules": true,
9
13
  "resolveJsonModule": true,
10
- "moduleResolution": "bundler"
14
+ "moduleResolution": "bundler",
15
+ "useDefineForClassFields": true,
16
+ "allowImportingTsExtensions": true
11
17
  },
12
18
  "include": ["src"]
13
19
  }
@@ -9,6 +9,6 @@
9
9
  },
10
10
  "devDependencies": {
11
11
  "@rsbuild/core": "workspace:*",
12
- "typescript": "^5.3.0"
12
+ "typescript": "^5.5.2"
13
13
  }
14
14
  }
@@ -3,11 +3,14 @@
3
3
  "target": "ES2020",
4
4
  "lib": ["DOM", "ES2020"],
5
5
  "module": "ESNext",
6
+ "noEmit": true,
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,
13
+ "allowImportingTsExtensions": true
11
14
  },
12
15
  "include": ["src"]
13
16
  }
@@ -1,6 +1,6 @@
1
- import './index.css';
2
1
  import Vue from 'vue';
3
2
  import App from './App.vue';
3
+ import './index.css';
4
4
 
5
5
  new Vue({
6
6
  el: '#root',
@@ -13,6 +13,6 @@
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
15
15
  "@rsbuild/plugin-vue2": "workspace:*",
16
- "typescript": "^5.3.0"
16
+ "typescript": "^5.5.2"
17
17
  }
18
18
  }
@@ -1,6 +1,6 @@
1
- import './index.css';
2
1
  import Vue from 'vue';
3
2
  import App from './App.vue';
3
+ import './index.css';
4
4
 
5
5
  new Vue({
6
6
  el: '#root',
@@ -3,11 +3,15 @@
3
3
  "target": "ES2020",
4
4
  "lib": ["DOM", "ES2020"],
5
5
  "module": "ESNext",
6
+ "jsx": "preserve",
7
+ "noEmit": true,
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,
14
+ "allowImportingTsExtensions": true
11
15
  },
12
16
  "include": ["src"]
13
17
  }
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["Vue.volar"]
3
+ }
@@ -8,7 +8,7 @@
8
8
  "preview": "rsbuild preview"
9
9
  },
10
10
  "dependencies": {
11
- "vue": "^3.3.4"
11
+ "vue": "^3.4.19"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
@@ -1,5 +1,5 @@
1
- import './index.css';
2
1
  import { createApp } from 'vue';
3
2
  import App from './App.vue';
3
+ import './index.css';
4
4
 
5
5
  createApp(App).mount('#root');
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["Vue.volar"]
3
+ }
@@ -8,11 +8,11 @@
8
8
  "preview": "rsbuild preview"
9
9
  },
10
10
  "dependencies": {
11
- "vue": "^3.3.4"
11
+ "vue": "^3.4.19"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
15
15
  "@rsbuild/plugin-vue": "workspace:*",
16
- "typescript": "^5.3.0"
16
+ "typescript": "^5.5.2"
17
17
  }
18
18
  }
@@ -3,6 +3,7 @@
3
3
  declare module '*.vue' {
4
4
  import type { DefineComponent } from 'vue';
5
5
 
6
+ // biome-ignore lint/complexity/noBannedTypes: reason
6
7
  const component: DefineComponent<{}, {}, any>;
7
8
  export default component;
8
9
  }
@@ -1,5 +1,5 @@
1
- import './index.css';
2
1
  import { createApp } from 'vue';
3
2
  import App from './App.vue';
3
+ import './index.css';
4
4
 
5
5
  createApp(App).mount('#root');
@@ -3,11 +3,16 @@
3
3
  "target": "ES2020",
4
4
  "lib": ["DOM", "ES2020"],
5
5
  "module": "ESNext",
6
+ "jsx": "preserve",
7
+ "jsxImportSource": "vue",
8
+ "noEmit": true,
6
9
  "strict": true,
7
10
  "skipLibCheck": true,
8
11
  "isolatedModules": true,
9
12
  "resolveJsonModule": true,
10
- "moduleResolution": "bundler"
13
+ "moduleResolution": "bundler",
14
+ "useDefineForClassFields": true,
15
+ "allowImportingTsExtensions": true
11
16
  },
12
17
  "include": ["src"]
13
18
  }
package/CHANGELOG.md DELETED
@@ -1,86 +0,0 @@
1
- # create-rsbuild
2
-
3
- ## 1.0.0
4
-
5
- ### Patch Changes
6
-
7
- - 1090e387: feat(create-rsbuild): bump typescript to v5.3.0
8
-
9
- ## 0.0.28
10
-
11
- ## 0.0.27
12
-
13
- ## 0.0.26
14
-
15
- ## 0.0.25
16
-
17
- ## 0.0.24
18
-
19
- ## 0.0.23
20
-
21
- ## 0.0.22
22
-
23
- ### Patch Changes
24
-
25
- - 73cac183: feat(create-rsbuild): add new lit template
26
- - 6c00e30: fix(create-rsbuild): missing tsconfig.json in vanilla template
27
- - 6c00e30: feat(create-rsbuild): improve next steps message
28
- - 82e7c249: fix(create-rsbuild): incorrect title in sample code
29
-
30
- ## 0.0.21
31
-
32
- ### Patch Changes
33
-
34
- - a782b44: feat(create-rsbuild): add new vanilla template
35
-
36
- ## 0.0.20
37
-
38
- ## 0.0.19
39
-
40
- ## 0.0.18
41
-
42
- ### Patch Changes
43
-
44
- - 6f1c4a1: feat: add builtin assets and CSS modules types
45
- - eed4dcb: feat(create-rsbuild): update all pages in templates
46
- - a4485ea: feat(create-rspack): add dev --open option by default
47
-
48
- ## 0.0.17
49
-
50
- ## 0.0.16
51
-
52
- ### Patch Changes
53
-
54
- - 9a52542: feat: add default meta configs and simplify the templates
55
-
56
- ## 0.0.15
57
-
58
- ## 0.0.14
59
-
60
- ## 0.0.13
61
-
62
- ## 0.0.12
63
-
64
- ### Patch Changes
65
-
66
- - 50c2711: feat(create-rsbuild): always use the latest version
67
-
68
- ## 0.0.11
69
-
70
- ### Patch Changes
71
-
72
- - 8a4cf1e: fix(create-rsbuild): incorrect preview command
73
- - db6b547: feat(create-rsbuild): templates depend on latest version of Rsbuild
74
-
75
- ## 0.0.10
76
-
77
- ### Patch Changes
78
-
79
- - 3d261af: fix(create-rsbuild): failed to publish tsconfig of templates
80
-
81
- ## 0.0.9
82
-
83
- ### Patch Changes
84
-
85
- - 0fbab50: fix(create-rsbuild): failed to resolve the templates
86
- - e6be3a5: fix(create-rspack): skip local files for debugging
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
package/modern.config.ts DELETED
@@ -1,3 +0,0 @@
1
- import baseConfig from '../../scripts/modern.base.config';
2
-
3
- export default baseConfig;
package/tsconfig.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "@rsbuild/tsconfig/base",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "baseUrl": "./"
6
- },
7
- "include": ["src"]
8
- }