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.
- package/README.md +33 -31
- package/index.js +47 -6
- package/package.json +1 -1
- package/template-deno-lit/vite.config.mjs +1 -1
- package/template-deno-lit-ts/vite.config.mts +1 -1
- package/template-deno-preact/vite.config.mjs +4 -4
- package/template-deno-preact-ts/vite.config.mts +4 -4
- package/template-deno-react/vite.config.mjs +2 -2
- package/template-deno-react-ts/vite.config.mts +2 -2
- package/template-deno-solid/vite.config.mjs +3 -3
- package/template-deno-solid-ts/vite.config.mts +3 -3
- package/template-deno-svelte/vite.config.mjs +3 -3
- package/template-deno-svelte-ts/vite.config.mts +3 -3
- package/template-deno-vue/vite.config.mjs +3 -3
- package/template-deno-vue-ts/vite.config.mts +3 -3
- package/template-library/package.json +1 -1
- package/template-library-ts/package.json +2 -2
- package/template-library-ts/tsconfig.json +1 -1
- package/template-ssr-preact/package.json +4 -4
- package/template-ssr-preact-ts/package.json +6 -6
- package/template-ssr-preact-ts/tsconfig.json +1 -1
- package/template-ssr-preact-ts/tsconfig.node.json +2 -6
- package/template-ssr-react/package.json +5 -5
- package/template-ssr-react-ts/package.json +7 -7
- package/template-ssr-react-ts/tsconfig.json +1 -1
- package/template-ssr-react-ts/tsconfig.node.json +2 -6
- package/template-ssr-solid/package.json +4 -4
- package/template-ssr-solid-ts/package.json +5 -5
- package/template-ssr-solid-ts/tsconfig.json +1 -1
- package/template-ssr-solid-ts/tsconfig.node.json +2 -6
- package/template-ssr-svelte/package.json +4 -4
- package/template-ssr-svelte-ts/package.json +7 -7
- package/template-ssr-svelte-ts/tsconfig.node.json +1 -5
- package/template-ssr-transform/package.json +1 -1
- package/template-ssr-vanilla/package.json +2 -2
- package/template-ssr-vanilla-ts/package.json +4 -4
- package/template-ssr-vanilla-ts/tsconfig.json +2 -4
- package/template-ssr-vue/package.json +4 -4
- package/template-ssr-vue-streaming/README.md +7 -0
- package/template-ssr-vue-streaming/_gitignore +24 -0
- package/template-ssr-vue-streaming/index.html +14 -0
- package/template-ssr-vue-streaming/package.json +24 -0
- package/template-ssr-vue-streaming/public/vite.svg +1 -0
- package/template-ssr-vue-streaming/server.js +77 -0
- package/template-ssr-vue-streaming/src/App.vue +31 -0
- package/template-ssr-vue-streaming/src/assets/vue.svg +1 -0
- package/template-ssr-vue-streaming/src/components/HelloWorld.vue +40 -0
- package/template-ssr-vue-streaming/src/entry-client.js +6 -0
- package/template-ssr-vue-streaming/src/entry-server.js +15 -0
- package/template-ssr-vue-streaming/src/main.js +10 -0
- package/template-ssr-vue-streaming/src/style.css +79 -0
- package/template-ssr-vue-streaming/vite.config.js +7 -0
- package/template-ssr-vue-streaming-ts/README.md +16 -0
- package/template-ssr-vue-streaming-ts/_gitignore +24 -0
- package/template-ssr-vue-streaming-ts/index.html +14 -0
- package/template-ssr-vue-streaming-ts/package.json +28 -0
- package/template-ssr-vue-streaming-ts/public/vite.svg +1 -0
- package/template-ssr-vue-streaming-ts/server.js +77 -0
- package/template-ssr-vue-streaming-ts/src/App.vue +31 -0
- package/template-ssr-vue-streaming-ts/src/assets/vue.svg +1 -0
- package/template-ssr-vue-streaming-ts/src/components/HelloWorld.vue +38 -0
- package/template-ssr-vue-streaming-ts/src/entry-client.ts +6 -0
- package/template-ssr-vue-streaming-ts/src/entry-server.ts +15 -0
- package/template-ssr-vue-streaming-ts/src/main.ts +10 -0
- package/template-ssr-vue-streaming-ts/src/style.css +79 -0
- package/template-ssr-vue-streaming-ts/src/vite-env.d.ts +7 -0
- package/template-ssr-vue-streaming-ts/tsconfig.json +25 -0
- package/{template-ssr-vanilla-ts → template-ssr-vue-streaming-ts}/tsconfig.node.json +2 -5
- package/template-ssr-vue-streaming-ts/vite.config.ts +7 -0
- package/template-ssr-vue-ts/package.json +7 -7
- package/template-ssr-vue-ts/tsconfig.json +1 -1
- 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,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": "
|
|
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
|
}
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"compression": "^1.7.4",
|
|
15
15
|
"express": "^4.18.2",
|
|
16
|
-
"sirv": "^2.0.
|
|
17
|
-
"vue": "^3.3.
|
|
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.
|
|
22
|
-
"@vitejs/plugin-vue": "^4.5.
|
|
21
|
+
"@types/node": "^20.10.5",
|
|
22
|
+
"@vitejs/plugin-vue": "^4.5.2",
|
|
23
23
|
"cross-env": "^7.0.3",
|
|
24
|
-
"typescript": "^5.
|
|
25
|
-
"vite": "^5.0.
|
|
26
|
-
"vue-tsc": "^1.8.
|
|
24
|
+
"typescript": "^5.3.3",
|
|
25
|
+
"vite": "^5.0.10",
|
|
26
|
+
"vue-tsc": "^1.8.26"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -3,12 +3,8 @@
|
|
|
3
3
|
"composite": true,
|
|
4
4
|
"skipLibCheck": true,
|
|
5
5
|
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "
|
|
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
|
}
|