vitrify 0.6.10 → 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 +3 -11
- package/package.json +2 -2
- package/src/node/index.ts +3 -10
- package/src/vite/vue/ssr/entry-server.ts +4 -2
package/dist/index.js
CHANGED
|
@@ -37,9 +37,7 @@ const moduleChunks = {
|
|
|
37
37
|
const manualChunks = (id, api) => {
|
|
38
38
|
if (id.includes('vitrify/src/')) {
|
|
39
39
|
const name = id.split('/').at(-1)?.split('.').at(0);
|
|
40
|
-
|
|
41
|
-
return name;
|
|
42
|
-
return 'vitrify';
|
|
40
|
+
return name;
|
|
43
41
|
}
|
|
44
42
|
else if (VIRTUAL_MODULES.some((virtualModule) => id.includes(virtualModule))) {
|
|
45
43
|
return VIRTUAL_MODULES.find((name) => id.includes(name));
|
|
@@ -494,16 +492,10 @@ export const baseConfig = async ({ ssr, appDir, publicDir, base = '/', command =
|
|
|
494
492
|
},
|
|
495
493
|
plugins,
|
|
496
494
|
optimizeDeps: {
|
|
497
|
-
exclude: [
|
|
498
|
-
'vue',
|
|
499
|
-
'vue-router',
|
|
500
|
-
'vue/server-renderer',
|
|
501
|
-
...serverModules,
|
|
502
|
-
...builtinModules
|
|
503
|
-
]
|
|
495
|
+
exclude: ['vue', 'vue-router', ...serverModules, ...builtinModules]
|
|
504
496
|
},
|
|
505
497
|
resolve: {
|
|
506
|
-
dedupe: ['vue', '
|
|
498
|
+
dedupe: ['vue', 'vue-router'],
|
|
507
499
|
alias
|
|
508
500
|
},
|
|
509
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
|
@@ -56,8 +56,7 @@ const moduleChunks = {
|
|
|
56
56
|
const manualChunks: ManualChunksOption = (id, api) => {
|
|
57
57
|
if (id.includes('vitrify/src/')) {
|
|
58
58
|
const name = id.split('/').at(-1)?.split('.').at(0)
|
|
59
|
-
|
|
60
|
-
return 'vitrify'
|
|
59
|
+
return name
|
|
61
60
|
} else if (
|
|
62
61
|
VIRTUAL_MODULES.some((virtualModule) => id.includes(virtualModule))
|
|
63
62
|
) {
|
|
@@ -578,16 +577,10 @@ export const baseConfig = async ({
|
|
|
578
577
|
},
|
|
579
578
|
plugins,
|
|
580
579
|
optimizeDeps: {
|
|
581
|
-
exclude: [
|
|
582
|
-
'vue',
|
|
583
|
-
'vue-router',
|
|
584
|
-
'vue/server-renderer',
|
|
585
|
-
...serverModules,
|
|
586
|
-
...builtinModules
|
|
587
|
-
]
|
|
580
|
+
exclude: ['vue', 'vue-router', ...serverModules, ...builtinModules]
|
|
588
581
|
},
|
|
589
582
|
resolve: {
|
|
590
|
-
dedupe: ['vue', '
|
|
583
|
+
dedupe: ['vue', 'vue-router'],
|
|
591
584
|
alias
|
|
592
585
|
},
|
|
593
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 = {
|