@absolutejs/absolute 0.19.0-beta.143 → 0.19.0-beta.145
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/.absolutejs/tsconfig.tsbuildinfo +1 -1
- package/dist/build.js +3 -1
- package/dist/build.js.map +3 -3
- package/dist/dev/client/handlers/vue.ts +10 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
|
@@ -192,11 +192,20 @@ export const handleVueUpdate = (message: {
|
|
|
192
192
|
// O(1) Vue HMR: import the changed module directly.
|
|
193
193
|
// __VUE_HMR_RUNTIME__.reload() inside the module hot-swaps the
|
|
194
194
|
// component in place — same pattern as React Fast Refresh.
|
|
195
|
-
// No unmount/remount, state preserved by Vue runtime.
|
|
196
195
|
const pageModuleUrl = message.data.pageModuleUrl;
|
|
197
196
|
if (pageModuleUrl) {
|
|
198
197
|
const clientStart = performance.now();
|
|
199
198
|
const modulePath = `${pageModuleUrl}?t=${Date.now()}`;
|
|
199
|
+
|
|
200
|
+
// When a composable/utility file changed (not the .vue file itself),
|
|
201
|
+
// force a full page reload so setup() re-runs with the new composable.
|
|
202
|
+
// Vue's rerender only swaps the template, not the setup closure.
|
|
203
|
+
if (message.data.forceReload) {
|
|
204
|
+
window.location.reload();
|
|
205
|
+
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
200
209
|
import(modulePath)
|
|
201
210
|
.then(() => {
|
|
202
211
|
sessionStorage.removeItem('__HMR_ACTIVE__');
|
package/dist/index.js
CHANGED
|
@@ -203884,6 +203884,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
|
|
|
203884
203884
|
}
|
|
203885
203885
|
}
|
|
203886
203886
|
const serverDuration = Date.now() - startTime;
|
|
203887
|
+
const forceReload = nonVueFiles.length > 0;
|
|
203887
203888
|
for (const changedFile of vueFiles) {
|
|
203888
203889
|
const pageModuleUrl = await getModuleUrl(changedFile);
|
|
203889
203890
|
state.lastHmrPath = changedFile;
|
|
@@ -203891,6 +203892,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
|
|
|
203891
203892
|
broadcastToClients(state, {
|
|
203892
203893
|
data: {
|
|
203893
203894
|
changeType: "full",
|
|
203895
|
+
forceReload,
|
|
203894
203896
|
framework: "vue",
|
|
203895
203897
|
manifest: state.manifest,
|
|
203896
203898
|
pageModuleUrl,
|
|
@@ -205752,5 +205754,5 @@ export {
|
|
|
205752
205754
|
ANGULAR_INIT_TIMEOUT_MS
|
|
205753
205755
|
};
|
|
205754
205756
|
|
|
205755
|
-
//# debugId=
|
|
205757
|
+
//# debugId=AEAC9DD46352BA7B64756E2164756E21
|
|
205756
205758
|
//# sourceMappingURL=index.js.map
|