@volpe/astro-svelte-spa 0.1.4 → 0.1.6

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/index.js +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -5,7 +5,7 @@ const VIRTUAL_MODULE_ID = "virtual:svelte-routes";
5
5
  const RESOLVED_VIRTUAL_MODULE_ID = "\0" + VIRTUAL_MODULE_ID;
6
6
 
7
7
  const VIRTUAL_SPA_ID = "virtual:svelte-spa";
8
- const RESOLVED_VIRTUAL_SPA_ID = "\0" + VIRTUAL_SPA_ID;
8
+ const RESOLVED_SPA_ID = "virtual:svelte-spa.svelte";
9
9
 
10
10
  /**
11
11
  * @typedef {Object} RouteNode
@@ -354,7 +354,7 @@ export function plugin(options = {}) {
354
354
  return RESOLVED_VIRTUAL_MODULE_ID;
355
355
  }
356
356
  if (id === VIRTUAL_SPA_ID) {
357
- return RESOLVED_VIRTUAL_SPA_ID;
357
+ return RESOLVED_SPA_ID;
358
358
  }
359
359
  },
360
360
 
@@ -362,7 +362,7 @@ export function plugin(options = {}) {
362
362
  if (id === RESOLVED_VIRTUAL_MODULE_ID) {
363
363
  return generateRoutesModule(pagesDir, basePath);
364
364
  }
365
- if (id === RESOLVED_VIRTUAL_SPA_ID) {
365
+ if (id === RESOLVED_SPA_ID) {
366
366
  return generateAppComponent();
367
367
  }
368
368
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volpe/astro-svelte-spa",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Vite plugin for file-based routing with svelte5-router in Astro",
5
5
  "type": "module",
6
6
  "main": "index.js",