vike-lite 1.0.9 → 1.0.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.
Files changed (2) hide show
  1. package/dist/vite.mjs +4 -4
  2. package/package.json +1 -1
package/dist/vite.mjs CHANGED
@@ -189,10 +189,10 @@ function routerPlugin({ pagesDir = "pages", serverEntry = "server/index.ts", api
189
189
  }
190
190
  setVikeState({ routes, errorRoute, config, manifest });
191
191
  `;
192
- if (id === resolvedVirtualEntryServerId) return `
193
- import '${virtualSetupId}';
194
- export { default } from '${path.join(viteConfigRoot, serverEntry)}';
195
- `;
192
+ if (id === resolvedVirtualEntryServerId) {
193
+ const normalizedServerEntry = path.join(viteConfigRoot, serverEntry).replaceAll("\\", "/");
194
+ return `import '${virtualSetupId}';\n${fs.readFileSync(normalizedServerEntry, "utf8")}`;
195
+ }
196
196
  },
197
197
  configureServer(server) {
198
198
  return () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike-lite",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.mjs",