vite-plugin-vanjs 0.1.17 → 0.1.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-vanjs",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "author": "thednp",
5
5
  "license": "MIT",
6
6
  "description": "A mini meta-framework for VanJS powered by Vite",
package/router/router.mjs CHANGED
@@ -84,9 +84,10 @@ export const Router = (initialProps = /* istanbul ignore next */ {}) => {
84
84
 
85
85
  // 2. Execute lifecycle
86
86
  await executeLifecycle(module.route, route.params);
87
+ const children = resolveChildren(module);
87
88
 
88
89
  // 3. Render the component (data is now in dataCache)
89
- return van.add(wrapper, ...resolveChildren(module));
90
+ return van.add(wrapper, ...children);
90
91
  } catch (error) {
91
92
  /* istanbul ignore next */
92
93
  console.error("Router error:", error);
@@ -113,8 +114,9 @@ export const Router = (initialProps = /* istanbul ignore next */ {}) => {
113
114
  const module = await route.component();
114
115
 
115
116
  await executeLifecycle(module.route, route.params);
117
+ const children = resolveChildren(module);
116
118
  updateHead();
117
- return van.add(wrapper, ...resolveChildren(module));
119
+ return van.add(wrapper, ...children);
118
120
  };
119
121
  }
120
122