@absolutejs/absolute 0.19.0-beta.144 → 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.
@@ -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
@@ -203867,11 +203867,6 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
203867
203867
  const nonVueFiles = filesToRebuild.filter((file4) => !file4.endsWith(".vue") && detectFramework(file4, state.resolvedPaths) === "vue");
203868
203868
  for (const tsFile of nonVueFiles) {
203869
203869
  const affected = getAffectedFiles(state.dependencyGraph, tsFile);
203870
- if (affected.length > 0) {
203871
- logWarn(`Vue composable change: ${basename8(tsFile)} affects ${affected.length} files: ${affected.map((f) => basename8(f)).join(", ")}`);
203872
- } else {
203873
- logWarn(`Vue composable change: ${basename8(tsFile)} has no dependents in graph`);
203874
- }
203875
203870
  for (const dep of affected) {
203876
203871
  if (dep.endsWith(".vue") && !vueFiles.includes(dep)) {
203877
203872
  vueFiles.push(dep);
@@ -203889,6 +203884,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
203889
203884
  }
203890
203885
  }
203891
203886
  const serverDuration = Date.now() - startTime;
203887
+ const forceReload = nonVueFiles.length > 0;
203892
203888
  for (const changedFile of vueFiles) {
203893
203889
  const pageModuleUrl = await getModuleUrl(changedFile);
203894
203890
  state.lastHmrPath = changedFile;
@@ -203896,6 +203892,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
203896
203892
  broadcastToClients(state, {
203897
203893
  data: {
203898
203894
  changeType: "full",
203895
+ forceReload,
203899
203896
  framework: "vue",
203900
203897
  manifest: state.manifest,
203901
203898
  pageModuleUrl,
@@ -205757,5 +205754,5 @@ export {
205757
205754
  ANGULAR_INIT_TIMEOUT_MS
205758
205755
  };
205759
205756
 
205760
- //# debugId=8AD2297F2572BB4E64756E2164756E21
205757
+ //# debugId=AEAC9DD46352BA7B64756E2164756E21
205761
205758
  //# sourceMappingURL=index.js.map