vike-lite 1.15.1 → 1.15.3
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/vite.mjs +2 -1
- package/package.json +1 -1
package/dist/vite.mjs
CHANGED
|
@@ -128,7 +128,7 @@ function vikeLite({ pagesDir = "pages", apiPrefix = "/api", prerender = false, s
|
|
|
128
128
|
for (const key in envVariables) if (process.env[key] === void 0) process.env[key] = envVariables[key];
|
|
129
129
|
outDir = config.build?.outDir ?? "dist";
|
|
130
130
|
const { emptyOutDir, minify = true, cssMinify = true, sourcemap } = config.build || {};
|
|
131
|
-
viteConfigRoot =
|
|
131
|
+
viteConfigRoot = config.root ? path.resolve(config.root) : process.cwd();
|
|
132
132
|
const { routes } = generateRoutes(viteConfigRoot, pagesDir);
|
|
133
133
|
hasAnyPrerender = prerender || routes.some((r) => r.prerender);
|
|
134
134
|
return {
|
|
@@ -273,6 +273,7 @@ function vikeLite({ pagesDir = "pages", apiPrefix = "/api", prerender = false, s
|
|
|
273
273
|
}
|
|
274
274
|
if (!serverEntryPath) throw new Error(`[vike-lite] serverEntry ${serverEntry} file not found`);
|
|
275
275
|
}
|
|
276
|
+
serverEntryPath = serverEntryPath.replaceAll("\\", "/");
|
|
276
277
|
return importSetup + `export*from'${serverEntryPath}';export{default}from'${serverEntryPath}';`;
|
|
277
278
|
}
|
|
278
279
|
if (serverEntry === false) return importSetup + "import{renderPage}from'vike-lite/server';export default{fetch:renderPage};";
|