vike-lite 1.0.10 → 1.0.12

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.
Files changed (2) hide show
  1. package/dist/vite.mjs +4 -3
  2. package/package.json +1 -1
package/dist/vite.mjs CHANGED
@@ -2,7 +2,6 @@ import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import { Readable } from "node:stream";
4
4
  import { pipeline } from "node:stream/promises";
5
- import { normalizePath } from "vite";
6
5
  //#region src/vite-plugin.ts
7
6
  function generateRoutes(pagesAbsPath) {
8
7
  if (!fs.existsSync(pagesAbsPath)) return { routes: [] };
@@ -191,8 +190,10 @@ function routerPlugin({ pagesDir = "pages", serverEntry = "server/index.ts", api
191
190
  setVikeState({ routes, errorRoute, config, manifest });
192
191
  `;
193
192
  if (id === resolvedVirtualEntryServerId) {
194
- const normalizedServerEntry = normalizePath(path.join(viteConfigRoot, serverEntry));
195
- return `import '${virtualSetupId}';\n${fs.readFileSync(normalizedServerEntry, "utf8")}`;
193
+ const normalizedServerEntry = path.join(viteConfigRoot, serverEntry).replaceAll("\\", "/");
194
+ return `import '${virtualSetupId}';
195
+ export * from '${normalizedServerEntry}'
196
+ export { default } from '${normalizedServerEntry}'`;
196
197
  }
197
198
  },
198
199
  configureServer(server) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike-lite",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.mjs",