@revojs/vue 0.1.4 → 0.1.5

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,4 +1,4 @@
1
- import { isServer, Radix, Scope, toRoutePath, useUrl, type Node } from "revojs";
1
+ import { Radix, Scope, toRoutePath, useUrl, type Node } from "revojs";
2
2
  import { type Component, createSSRApp } from "vue";
3
3
  import { createMemoryHistory, createRouter, createWebHistory, RouterView, type RouteRecordRaw } from "vue-router";
4
4
  import Main from "#alias/vue/main";
@@ -43,11 +43,11 @@ export default async (scope: Scope) => {
43
43
  }
44
44
 
45
45
  const router = createRouter({
46
- history: isServer() ? createMemoryHistory() : createWebHistory(),
46
+ history: import.meta.server ? createMemoryHistory() : createWebHistory(),
47
47
  routes: Object.entries(radix.rootNode.children).map(([path, node]) => toRoute(path, node)),
48
48
  });
49
49
 
50
- if (isServer()) {
50
+ if (import.meta.server) {
51
51
  const { pathname } = useUrl(scope);
52
52
 
53
53
  await router.push(pathname);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revojs/vue",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "repository": "coverbase/revojs",
6
6
  "license": "MIT",