vitrify 0.6.8 → 0.6.11
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/dist/index.js +4 -5
- package/package.json +2 -2
- package/src/node/index.ts +4 -4
- package/src/vite/vue/ssr/entry-server.ts +4 -2
package/dist/index.js
CHANGED
|
@@ -31,14 +31,13 @@ const manualChunkNames = [
|
|
|
31
31
|
'server'
|
|
32
32
|
];
|
|
33
33
|
const moduleChunks = {
|
|
34
|
-
vue: ['vue', '@vue'],
|
|
34
|
+
vue: ['vue', '@vue', 'vue-router'],
|
|
35
35
|
quasar: ['quasar']
|
|
36
36
|
};
|
|
37
37
|
const manualChunks = (id, api) => {
|
|
38
|
-
if (id.includes('vitrify/src/
|
|
38
|
+
if (id.includes('vitrify/src/')) {
|
|
39
39
|
const name = id.split('/').at(-1)?.split('.').at(0);
|
|
40
|
-
|
|
41
|
-
return name;
|
|
40
|
+
return name;
|
|
42
41
|
}
|
|
43
42
|
else if (VIRTUAL_MODULES.some((virtualModule) => id.includes(virtualModule))) {
|
|
44
43
|
return VIRTUAL_MODULES.find((name) => id.includes(name));
|
|
@@ -496,7 +495,7 @@ export const baseConfig = async ({ ssr, appDir, publicDir, base = '/', command =
|
|
|
496
495
|
exclude: ['vue', 'vue-router', ...serverModules, ...builtinModules]
|
|
497
496
|
},
|
|
498
497
|
resolve: {
|
|
499
|
-
dedupe: ['vue', '
|
|
498
|
+
dedupe: ['vue', 'vue-router'],
|
|
500
499
|
alias
|
|
501
500
|
},
|
|
502
501
|
build: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitrify",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Stefan van Herwijnen",
|
|
6
6
|
"description": "Pre-configured Vite CLI for your framework",
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
"@fastify/static": "^6.4.0",
|
|
61
61
|
"@quasar/extras": "^1.14.2",
|
|
62
62
|
"@vitejs/plugin-vue": "^3.0.0-alpha.1",
|
|
63
|
-
"@vue/server-renderer": "^3.2.37",
|
|
64
63
|
"builtin-modules": "^3.3.0",
|
|
65
64
|
"cac": "^6.7.12",
|
|
66
65
|
"chalk": "^5.0.1",
|
|
@@ -87,6 +86,7 @@
|
|
|
87
86
|
"@types/node": "^18.0.1",
|
|
88
87
|
"@types/ws": "^8.5.3",
|
|
89
88
|
"@vue/runtime-core": "^3.2.37",
|
|
89
|
+
"@vue/server-renderer": "^3.2.37",
|
|
90
90
|
"quasar": "^2.7.5",
|
|
91
91
|
"rollup": "^2.75.7",
|
|
92
92
|
"typescript": "^4.7.4",
|
package/src/node/index.ts
CHANGED
|
@@ -50,13 +50,13 @@ const manualChunkNames = [
|
|
|
50
50
|
]
|
|
51
51
|
|
|
52
52
|
const moduleChunks = {
|
|
53
|
-
vue: ['vue', '@vue'],
|
|
53
|
+
vue: ['vue', '@vue', 'vue-router'],
|
|
54
54
|
quasar: ['quasar']
|
|
55
55
|
}
|
|
56
56
|
const manualChunks: ManualChunksOption = (id, api) => {
|
|
57
|
-
if (id.includes('vitrify/src/
|
|
57
|
+
if (id.includes('vitrify/src/')) {
|
|
58
58
|
const name = id.split('/').at(-1)?.split('.').at(0)
|
|
59
|
-
|
|
59
|
+
return name
|
|
60
60
|
} else if (
|
|
61
61
|
VIRTUAL_MODULES.some((virtualModule) => id.includes(virtualModule))
|
|
62
62
|
) {
|
|
@@ -580,7 +580,7 @@ export const baseConfig = async ({
|
|
|
580
580
|
exclude: ['vue', 'vue-router', ...serverModules, ...builtinModules]
|
|
581
581
|
},
|
|
582
582
|
resolve: {
|
|
583
|
-
dedupe: ['vue', '
|
|
583
|
+
dedupe: ['vue', 'vue-router'],
|
|
584
584
|
alias
|
|
585
585
|
},
|
|
586
586
|
build: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createApp } from '../main.js'
|
|
2
|
-
import { renderToString } from 'vue/server-renderer'
|
|
2
|
+
// import { renderToString } from 'vue/server-renderer'
|
|
3
3
|
|
|
4
4
|
import { onRendered } from 'virtual:vitrify-hooks'
|
|
5
5
|
|
|
@@ -37,7 +37,9 @@ export const getRoutes = async () =>
|
|
|
37
37
|
})
|
|
38
38
|
).routes
|
|
39
39
|
|
|
40
|
-
export async function render(url, manifest, ssrContext) {
|
|
40
|
+
export async function render(url, manifest, ssrContext, renderToString) {
|
|
41
|
+
if (!renderToString)
|
|
42
|
+
renderToString = (await import('vue/server-renderer')).renderToString
|
|
41
43
|
const { app, router } = await initializeApp(url, ssrContext)
|
|
42
44
|
|
|
43
45
|
const ctx = {
|