@volpe/astro-svelte-spa 0.1.5 → 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.
- package/index.js +3 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -5,6 +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_SPA_ID = "virtual:svelte-spa.svelte";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @typedef {Object} RouteNode
|
|
@@ -353,7 +354,7 @@ export function plugin(options = {}) {
|
|
|
353
354
|
return RESOLVED_VIRTUAL_MODULE_ID;
|
|
354
355
|
}
|
|
355
356
|
if (id === VIRTUAL_SPA_ID) {
|
|
356
|
-
return
|
|
357
|
+
return RESOLVED_SPA_ID;
|
|
357
358
|
}
|
|
358
359
|
},
|
|
359
360
|
|
|
@@ -361,7 +362,7 @@ export function plugin(options = {}) {
|
|
|
361
362
|
if (id === RESOLVED_VIRTUAL_MODULE_ID) {
|
|
362
363
|
return generateRoutesModule(pagesDir, basePath);
|
|
363
364
|
}
|
|
364
|
-
if (id ===
|
|
365
|
+
if (id === RESOLVED_SPA_ID) {
|
|
365
366
|
return generateAppComponent();
|
|
366
367
|
}
|
|
367
368
|
},
|