Comparing version 0.2.2 to 0.2.3
@@ -66,1 +66,5 @@ import type { Config as ConfigCore } from 'vite-plugin-ssr/types'; | ||
export default _default; | ||
declare const globalName: (target: Object, value: string) => Object; | ||
declare global { | ||
var __name: typeof globalName; | ||
} |
@@ -52,1 +52,18 @@ // Depending on the value of `config.meta.ssr`, set other config options' `env` | ||
}; | ||
// This is a workaround for | ||
// * https://github.com/vuejs/core/issues/8303 | ||
// * https://github.com/esbuild-kit/tsx/issues/113 | ||
// Without this, when running vike-vue with tsx (for example when scaffolding a | ||
// Vue+Express project with Bati), querying the server will fail with the | ||
// following error: | ||
// [vite-plugin-ssr][request(1)] HTTP request: / | ||
// [vite][request(1)] __name is not defined | ||
// [vite][request(1)] __name is not defined | ||
// [vite][request(1)] __name is not defined | ||
// [vite][request(1)] Error when evaluating SSR module virtual:vite-plugin-ssr:importPageCode:server:/pages/index: failed to import "/pages/index/+Page.vue" | ||
// |- ReferenceError: __name is not defined | ||
const globalName = (target, value) => Object.defineProperty(target, 'name', { | ||
value, | ||
configurable: true | ||
}); | ||
globalThis.__name = globalName; |
export default onRenderHtml; | ||
import type { PageContextServer } from './types'; | ||
declare function onRenderHtml(pageContext: PageContextServer): Promise<{ | ||
documentHtml: import("vite-plugin-ssr/dist/types/node/runtime/html/renderHtml.js").TemplateWrapped; | ||
documentHtml: import("vite-plugin-ssr/dist/esm/node/runtime/html/renderHtml.js").TemplateWrapped; | ||
pageContext: { | ||
@@ -6,0 +6,0 @@ enableEagerStreaming: boolean; |
{ | ||
"name": "vike-vue", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"type": "module", | ||
@@ -24,3 +24,3 @@ "main": "./dist/renderer/+config.js", | ||
"vite": "^4.4.9", | ||
"vite-plugin-ssr": "^0.4.136", | ||
"vite-plugin-ssr": "^0.4.140", | ||
"vue": "^3.3.4" | ||
@@ -27,0 +27,0 @@ }, |
16364
394