create-vite-extra 2.0.1 → 2.1.0

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 +33 -31
  2. package/index.js +47 -6
  3. package/package.json +1 -1
  4. package/template-deno-lit/vite.config.mjs +1 -1
  5. package/template-deno-lit-ts/vite.config.mts +1 -1
  6. package/template-deno-preact/vite.config.mjs +4 -4
  7. package/template-deno-preact-ts/vite.config.mts +4 -4
  8. package/template-deno-react/vite.config.mjs +2 -2
  9. package/template-deno-react-ts/vite.config.mts +2 -2
  10. package/template-deno-solid/vite.config.mjs +3 -3
  11. package/template-deno-solid-ts/vite.config.mts +3 -3
  12. package/template-deno-svelte/vite.config.mjs +3 -3
  13. package/template-deno-svelte-ts/vite.config.mts +3 -3
  14. package/template-deno-vue/vite.config.mjs +3 -3
  15. package/template-deno-vue-ts/vite.config.mts +3 -3
  16. package/template-library/package.json +1 -1
  17. package/template-library-ts/package.json +2 -2
  18. package/template-library-ts/tsconfig.json +1 -1
  19. package/template-ssr-preact/package.json +4 -4
  20. package/template-ssr-preact-ts/package.json +6 -6
  21. package/template-ssr-preact-ts/tsconfig.json +1 -1
  22. package/template-ssr-preact-ts/tsconfig.node.json +2 -6
  23. package/template-ssr-react/package.json +5 -5
  24. package/template-ssr-react-ts/package.json +7 -7
  25. package/template-ssr-react-ts/tsconfig.json +1 -1
  26. package/template-ssr-react-ts/tsconfig.node.json +2 -6
  27. package/template-ssr-solid/package.json +4 -4
  28. package/template-ssr-solid-ts/package.json +5 -5
  29. package/template-ssr-solid-ts/tsconfig.json +1 -1
  30. package/template-ssr-solid-ts/tsconfig.node.json +2 -6
  31. package/template-ssr-svelte/package.json +4 -4
  32. package/template-ssr-svelte-ts/package.json +7 -7
  33. package/template-ssr-svelte-ts/tsconfig.node.json +1 -5
  34. package/template-ssr-transform/package.json +1 -1
  35. package/template-ssr-vanilla/package.json +2 -2
  36. package/template-ssr-vanilla-ts/package.json +4 -4
  37. package/template-ssr-vanilla-ts/tsconfig.json +2 -4
  38. package/template-ssr-vue/package.json +4 -4
  39. package/template-ssr-vue-streaming/README.md +7 -0
  40. package/template-ssr-vue-streaming/_gitignore +24 -0
  41. package/template-ssr-vue-streaming/index.html +14 -0
  42. package/template-ssr-vue-streaming/package.json +24 -0
  43. package/template-ssr-vue-streaming/public/vite.svg +1 -0
  44. package/template-ssr-vue-streaming/server.js +77 -0
  45. package/template-ssr-vue-streaming/src/App.vue +31 -0
  46. package/template-ssr-vue-streaming/src/assets/vue.svg +1 -0
  47. package/template-ssr-vue-streaming/src/components/HelloWorld.vue +40 -0
  48. package/template-ssr-vue-streaming/src/entry-client.js +6 -0
  49. package/template-ssr-vue-streaming/src/entry-server.js +15 -0
  50. package/template-ssr-vue-streaming/src/main.js +10 -0
  51. package/template-ssr-vue-streaming/src/style.css +79 -0
  52. package/template-ssr-vue-streaming/vite.config.js +7 -0
  53. package/template-ssr-vue-streaming-ts/README.md +16 -0
  54. package/template-ssr-vue-streaming-ts/_gitignore +24 -0
  55. package/template-ssr-vue-streaming-ts/index.html +14 -0
  56. package/template-ssr-vue-streaming-ts/package.json +28 -0
  57. package/template-ssr-vue-streaming-ts/public/vite.svg +1 -0
  58. package/template-ssr-vue-streaming-ts/server.js +77 -0
  59. package/template-ssr-vue-streaming-ts/src/App.vue +31 -0
  60. package/template-ssr-vue-streaming-ts/src/assets/vue.svg +1 -0
  61. package/template-ssr-vue-streaming-ts/src/components/HelloWorld.vue +38 -0
  62. package/template-ssr-vue-streaming-ts/src/entry-client.ts +6 -0
  63. package/template-ssr-vue-streaming-ts/src/entry-server.ts +15 -0
  64. package/template-ssr-vue-streaming-ts/src/main.ts +10 -0
  65. package/template-ssr-vue-streaming-ts/src/style.css +79 -0
  66. package/template-ssr-vue-streaming-ts/src/vite-env.d.ts +7 -0
  67. package/template-ssr-vue-streaming-ts/tsconfig.json +25 -0
  68. package/{template-ssr-vanilla-ts → template-ssr-vue-streaming-ts}/tsconfig.node.json +2 -5
  69. package/template-ssr-vue-streaming-ts/vite.config.ts +7 -0
  70. package/template-ssr-vue-ts/package.json +7 -7
  71. package/template-ssr-vue-ts/tsconfig.json +1 -1
  72. package/template-ssr-vue-ts/tsconfig.node.json +2 -6
@@ -0,0 +1,10 @@
1
+ import { createSSRApp } from 'vue'
2
+ import App from './App.vue'
3
+
4
+ // SSR requires a fresh app instance per request, therefore we export a function
5
+ // that creates a fresh app instance. If using Vuex, we'd also be creating a
6
+ // fresh store here.
7
+ export function createApp() {
8
+ const app = createSSRApp(App)
9
+ return { app }
10
+ }
@@ -0,0 +1,79 @@
1
+ :root {
2
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
3
+ line-height: 1.5;
4
+ font-weight: 400;
5
+
6
+ color-scheme: light dark;
7
+ color: rgba(255, 255, 255, 0.87);
8
+ background-color: #242424;
9
+
10
+ font-synthesis: none;
11
+ text-rendering: optimizeLegibility;
12
+ -webkit-font-smoothing: antialiased;
13
+ -moz-osx-font-smoothing: grayscale;
14
+ }
15
+
16
+ a {
17
+ font-weight: 500;
18
+ color: #646cff;
19
+ text-decoration: inherit;
20
+ }
21
+ a:hover {
22
+ color: #535bf2;
23
+ }
24
+
25
+ body {
26
+ margin: 0;
27
+ display: flex;
28
+ place-items: center;
29
+ min-width: 320px;
30
+ min-height: 100vh;
31
+ }
32
+
33
+ h1 {
34
+ font-size: 3.2em;
35
+ line-height: 1.1;
36
+ }
37
+
38
+ button {
39
+ border-radius: 8px;
40
+ border: 1px solid transparent;
41
+ padding: 0.6em 1.2em;
42
+ font-size: 1em;
43
+ font-weight: 500;
44
+ font-family: inherit;
45
+ background-color: #1a1a1a;
46
+ cursor: pointer;
47
+ transition: border-color 0.25s;
48
+ }
49
+ button:hover {
50
+ border-color: #646cff;
51
+ }
52
+ button:focus,
53
+ button:focus-visible {
54
+ outline: 4px auto -webkit-focus-ring-color;
55
+ }
56
+
57
+ .card {
58
+ padding: 2em;
59
+ }
60
+
61
+ #app {
62
+ max-width: 1280px;
63
+ margin: 0 auto;
64
+ padding: 2rem;
65
+ text-align: center;
66
+ }
67
+
68
+ @media (prefers-color-scheme: light) {
69
+ :root {
70
+ color: #213547;
71
+ background-color: #ffffff;
72
+ }
73
+ a:hover {
74
+ color: #747bff;
75
+ }
76
+ button {
77
+ background-color: #f9f9f9;
78
+ }
79
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module '*.vue' {
4
+ import type { DefineComponent } from 'vue'
5
+ const component: DefineComponent<{}, {}, any>
6
+ export default component
7
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "Bundler",
11
+ "allowImportingTsExtensions": true,
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "noEmit": true,
15
+ "jsx": "preserve",
16
+
17
+ /* Linting */
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "noFallthroughCasesInSwitch": true
22
+ },
23
+ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
24
+ "references": [{ "path": "./tsconfig.node.json" }]
25
+ }
@@ -3,11 +3,8 @@
3
3
  "composite": true,
4
4
  "skipLibCheck": true,
5
5
  "module": "ESNext",
6
- "moduleResolution": "bundler",
6
+ "moduleResolution": "Bundler",
7
7
  "allowSyntheticDefaultImports": true
8
8
  },
9
- "include": [
10
- "src/entry-server.ts",
11
- "src/vite-env.d.ts"
12
- ]
9
+ "include": ["vite.config.ts"]
13
10
  }
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from 'vite'
2
+ import vue from '@vitejs/plugin-vue'
3
+
4
+ // https://vitejs.dev/config/
5
+ export default defineConfig({
6
+ plugins: [vue()]
7
+ })
@@ -13,16 +13,16 @@
13
13
  "dependencies": {
14
14
  "compression": "^1.7.4",
15
15
  "express": "^4.18.2",
16
- "sirv": "^2.0.3",
17
- "vue": "^3.3.8"
16
+ "sirv": "^2.0.4",
17
+ "vue": "^3.3.13"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/express": "^4.17.21",
21
- "@types/node": "^20.9.0",
22
- "@vitejs/plugin-vue": "^4.5.0",
21
+ "@types/node": "^20.10.5",
22
+ "@vitejs/plugin-vue": "^4.5.2",
23
23
  "cross-env": "^7.0.3",
24
- "typescript": "^5.2.2",
25
- "vite": "^5.0.0",
26
- "vue-tsc": "^1.8.22"
24
+ "typescript": "^5.3.3",
25
+ "vite": "^5.0.10",
26
+ "vue-tsc": "^1.8.26"
27
27
  }
28
28
  }
@@ -7,7 +7,7 @@
7
7
  "skipLibCheck": true,
8
8
 
9
9
  /* Bundler mode */
10
- "moduleResolution": "bundler",
10
+ "moduleResolution": "Bundler",
11
11
  "allowImportingTsExtensions": true,
12
12
  "resolveJsonModule": true,
13
13
  "isolatedModules": true,
@@ -3,12 +3,8 @@
3
3
  "composite": true,
4
4
  "skipLibCheck": true,
5
5
  "module": "ESNext",
6
- "moduleResolution": "bundler",
6
+ "moduleResolution": "Bundler",
7
7
  "allowSyntheticDefaultImports": true
8
8
  },
9
- "include": [
10
- "vite.config.ts",
11
- "src/entry-server.ts",
12
- "src/vite-env.d.ts"
13
- ]
9
+ "include": ["vite.config.ts"]
14
10
  }