vike-lite 1.1.3 → 1.2.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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as RenderContext, r as matchRoute, t as Config } from "../index-
|
|
1
|
+
import { n as RenderContext, r as matchRoute, t as Config } from "../index-kftPCG4J.mjs";
|
|
2
2
|
export { Config, RenderContext, matchRoute };
|
package/dist/server.mjs
CHANGED
|
@@ -114,7 +114,7 @@ async function renderErrorPage(req, status, urlPathname, error) {
|
|
|
114
114
|
is500: status === 500,
|
|
115
115
|
errorMessage: status === 500 && error instanceof Error ? error.message : void 0
|
|
116
116
|
};
|
|
117
|
-
const html = onRenderHtml({
|
|
117
|
+
const html = await onRenderHtml({
|
|
118
118
|
pageContext,
|
|
119
119
|
Page: PageModule.Page ?? PageModule.default,
|
|
120
120
|
Layout: LayoutModule ? LayoutModule.Layout ?? LayoutModule.default : void 0,
|
|
@@ -149,7 +149,7 @@ async function renderPage(req) {
|
|
|
149
149
|
const { pageContext, route, PageModule, HeadModule, LayoutModule } = resolved;
|
|
150
150
|
if (isJsonRequest) return Response.json(pageContext);
|
|
151
151
|
const { default: onRenderHtml } = await store.config.onRenderHtml();
|
|
152
|
-
const html = onRenderHtml({
|
|
152
|
+
const html = await onRenderHtml({
|
|
153
153
|
pageContext,
|
|
154
154
|
Page: PageModule.Page ?? PageModule.default,
|
|
155
155
|
Head: HeadModule ? HeadModule.Head ?? HeadModule.default : void 0,
|
package/dist/vite.mjs
CHANGED
|
@@ -96,13 +96,18 @@ function routerPlugin({ pagesDir = "pages", serverEntry = "server/index", apiPre
|
|
|
96
96
|
config(config) {
|
|
97
97
|
outDir = config.build?.outDir ?? "dist";
|
|
98
98
|
const emptyOutDir = config.build?.emptyOutDir;
|
|
99
|
+
const minify = config.build?.minify ?? true;
|
|
100
|
+
const cssMinify = config.build?.cssMinify ?? true;
|
|
101
|
+
const sourcemap = config.build?.sourcemap;
|
|
99
102
|
return {
|
|
100
103
|
appType: "custom",
|
|
101
104
|
environments: {
|
|
102
105
|
client: { build: {
|
|
103
106
|
outDir: path.join(outDir, "client"),
|
|
104
107
|
emptyOutDir: emptyOutDir ?? true,
|
|
105
|
-
|
|
108
|
+
minify,
|
|
109
|
+
cssMinify,
|
|
110
|
+
sourcemap,
|
|
106
111
|
manifest: true,
|
|
107
112
|
rolldownOptions: {
|
|
108
113
|
input: virtualEntryClientId,
|
|
@@ -121,6 +126,8 @@ function routerPlugin({ pagesDir = "pages", serverEntry = "server/index", apiPre
|
|
|
121
126
|
target: "esnext",
|
|
122
127
|
outDir: path.join(outDir, "server"),
|
|
123
128
|
emptyOutDir: emptyOutDir ?? true,
|
|
129
|
+
minify,
|
|
130
|
+
sourcemap,
|
|
124
131
|
rolldownOptions: {
|
|
125
132
|
input: virtualEntryServerId,
|
|
126
133
|
output: {
|