@revojs/vue 0.1.22 → 0.1.23

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/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
- import { addRoutes, useKit } from "revojs/kit";
2
- import "revojs";
1
+ import { addAlias, addRoutes, useKit } from "revojs/kit";
3
2
 
4
3
  //#region src/index.ts
5
4
  function addPages(app, path) {
@@ -12,11 +11,11 @@ function vue() {
12
11
  entries: ["./routes"]
13
12
  } } },
14
13
  setup(app) {
15
- const { toPath, addAlias } = useKit(app, import.meta.url);
16
- app.config.client = toPath("./module/index.html");
17
- addRoutes(app, toPath("./module/routes"));
18
- addAlias("vue/app", "./module/app.ts");
19
- addAlias("vue/main", "./module/main.vue");
14
+ const { fromModule } = useKit(import.meta.url);
15
+ app.config.client = fromModule("./module/index.html");
16
+ addRoutes(app, fromModule("./module/routes"));
17
+ addAlias(app, "vue/app", fromModule("./module/app.ts"));
18
+ addAlias(app, "vue/main", fromModule("./module/main.vue"));
20
19
  }
21
20
  };
22
21
  }
@@ -34,13 +34,9 @@ export default async (scope: Scope) => {
34
34
  const radix = new Radix<Component>();
35
35
 
36
36
  for (const name in pages) {
37
- const Component = pages[name];
37
+ const [path] = toRoutePath(name);
38
38
 
39
- if (Component) {
40
- const [path] = toRoutePath(name);
41
-
42
- radix.use(path, Component);
43
- }
39
+ radix.use(path, pages[name]);
44
40
  }
45
41
 
46
42
  const router = createRouter({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revojs/vue",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "type": "module",
5
5
  "repository": "coverbase/revojs",
6
6
  "license": "MIT",