vue-micro-router 1.0.8 → 1.0.10
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/bin/gen-attrs-types.mjs +5 -8
- package/package.json +1 -1
package/bin/gen-attrs-types.mjs
CHANGED
|
@@ -62,9 +62,9 @@ if (!scanDir) {
|
|
|
62
62
|
}
|
|
63
63
|
const SCAN_PATH = resolve(CWD, scanDir);
|
|
64
64
|
|
|
65
|
-
//
|
|
65
|
+
// Always output to project root — avoids Vite HMR loop when inside src/
|
|
66
66
|
if (!outputFile) {
|
|
67
|
-
outputFile =
|
|
67
|
+
outputFile = 'vue-micro-router.d.ts';
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
console.log(`Scan: ${scanDir}/`);
|
|
@@ -296,13 +296,10 @@ if (watchMode) {
|
|
|
296
296
|
}, 300);
|
|
297
297
|
};
|
|
298
298
|
|
|
299
|
-
const outputBasename = outputFile.split('/').pop();
|
|
300
|
-
|
|
301
299
|
fsWatch(SCAN_PATH, { recursive: true }, (event, filename) => {
|
|
302
300
|
if (!filename) return;
|
|
303
|
-
// Skip output file
|
|
304
|
-
if (filename.endsWith(
|
|
305
|
-
|
|
306
|
-
if (ext === '.vue' || ext === '.ts') regenerate();
|
|
301
|
+
// Skip .d.ts files (output file, auto-imports.d.ts, etc.) — only watch source
|
|
302
|
+
if (filename.endsWith('.d.ts')) return;
|
|
303
|
+
if (filename.endsWith('.vue') || filename.endsWith('.ts')) regenerate();
|
|
307
304
|
});
|
|
308
305
|
}
|