@revojs/vue 0.1.36 → 0.1.37

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.
@@ -1,5 +1,5 @@
1
1
  import Main from "#alias/vue/main";
2
- import pages from "#virtual/pages";
2
+ import { entries } from "#pages";
3
3
  import { isServer, Radix, Scope, useUrl, type Node } from "revojs";
4
4
  import { createApp, createSSRApp, type Component } from "vue";
5
5
  import {
@@ -45,7 +45,7 @@ function toRoute(path: string, node: Node<Component>, index: number): RouteRecor
45
45
  export default async (scope: Scope) => {
46
46
  const radix = new Radix<Component>();
47
47
 
48
- for (const path in pages) {
48
+ for (const path in entries) {
49
49
  const segments = path.split("/");
50
50
 
51
51
  for (const attribute of segments.pop()?.split(".") ?? []) {
@@ -56,7 +56,7 @@ export default async (scope: Scope) => {
56
56
  segments.push(attribute);
57
57
  }
58
58
 
59
- radix.use(segments, pages[path]);
59
+ radix.use(segments, entries[path]);
60
60
  }
61
61
 
62
62
  const rootNode = toRoute("/", radix.rootNode, 0);
@@ -1,5 +1,5 @@
1
1
  import createApp from "#alias/vue/app";
2
- import client from "#virtual/client";
2
+ import client from "#client";
3
3
  import { defineRoute, sendHtml, useServer } from "revojs";
4
4
  import { renderToString } from "vue/server-renderer";
5
5
  import { isServerSideRendering } from "../../../client";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revojs/vue",
3
- "version": "0.1.36",
3
+ "version": "0.1.37",
4
4
  "license": "MIT",
5
5
  "repository": "coverbase/revojs",
6
6
  "files": [
@@ -12,14 +12,6 @@ declare module "#alias/vue/main" {
12
12
  export default app;
13
13
  }
14
14
 
15
- declare module "#virtual/pages" {
16
- import type { Component } from "vue";
17
-
18
- const pages: Record<string, Component>;
19
-
20
- export default pages;
21
- }
22
-
23
15
  declare module "*.vue" {
24
16
  import type { DefineComponent } from "vue";
25
17
 
@@ -0,0 +1,5 @@
1
+ declare module "#pages" {
2
+ import type { Component } from "vue";
3
+
4
+ export const entries: Record<string, Component>;
5
+ }