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 +1 -1
- package/router/router.mjs +4 -2
package/package.json
CHANGED
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, ...
|
|
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, ...
|
|
119
|
+
return van.add(wrapper, ...children);
|
|
118
120
|
};
|
|
119
121
|
}
|
|
120
122
|
|