@lovable.dev/vite-tanstack-config 1.2.0 → 1.3.0
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/dist/index.cjs +18 -1
- package/dist/index.js +18 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -113,6 +113,23 @@ function cleanServerConfig(config) {
|
|
|
113
113
|
}
|
|
114
114
|
return config;
|
|
115
115
|
}
|
|
116
|
+
function applyWatchDebounceDefaults(config) {
|
|
117
|
+
const existingWatch = config.server?.watch ?? {};
|
|
118
|
+
const existingAwaitWriteFinish = existingWatch.awaitWriteFinish;
|
|
119
|
+
const hasAwaitWriteFinishObject = !!existingAwaitWriteFinish && typeof existingAwaitWriteFinish === "object" && !Array.isArray(existingAwaitWriteFinish);
|
|
120
|
+
return (0, import_vite.mergeConfig)(config, {
|
|
121
|
+
server: {
|
|
122
|
+
watch: {
|
|
123
|
+
...existingWatch,
|
|
124
|
+
awaitWriteFinish: {
|
|
125
|
+
...hasAwaitWriteFinishObject ? existingAwaitWriteFinish : {},
|
|
126
|
+
stabilityThreshold: 1e3,
|
|
127
|
+
pollInterval: 100
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
116
133
|
function devClientErrorLogger() {
|
|
117
134
|
const VIRTUAL_ID = "virtual:dev-client-error-handler";
|
|
118
135
|
const RESOLVED_ID = "\0" + VIRTUAL_ID;
|
|
@@ -326,7 +343,7 @@ function defineConfig(configOrOptions = {}) {
|
|
|
326
343
|
} else {
|
|
327
344
|
config = (0, import_vite.mergeConfig)({ server: { host: "::", port: 8080 } }, config);
|
|
328
345
|
}
|
|
329
|
-
return config;
|
|
346
|
+
return applyWatchDebounceDefaults(config);
|
|
330
347
|
};
|
|
331
348
|
}
|
|
332
349
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.js
CHANGED
|
@@ -79,6 +79,23 @@ function cleanServerConfig(config) {
|
|
|
79
79
|
}
|
|
80
80
|
return config;
|
|
81
81
|
}
|
|
82
|
+
function applyWatchDebounceDefaults(config) {
|
|
83
|
+
const existingWatch = config.server?.watch ?? {};
|
|
84
|
+
const existingAwaitWriteFinish = existingWatch.awaitWriteFinish;
|
|
85
|
+
const hasAwaitWriteFinishObject = !!existingAwaitWriteFinish && typeof existingAwaitWriteFinish === "object" && !Array.isArray(existingAwaitWriteFinish);
|
|
86
|
+
return mergeConfig(config, {
|
|
87
|
+
server: {
|
|
88
|
+
watch: {
|
|
89
|
+
...existingWatch,
|
|
90
|
+
awaitWriteFinish: {
|
|
91
|
+
...hasAwaitWriteFinishObject ? existingAwaitWriteFinish : {},
|
|
92
|
+
stabilityThreshold: 1e3,
|
|
93
|
+
pollInterval: 100
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
82
99
|
function devClientErrorLogger() {
|
|
83
100
|
const VIRTUAL_ID = "virtual:dev-client-error-handler";
|
|
84
101
|
const RESOLVED_ID = "\0" + VIRTUAL_ID;
|
|
@@ -292,7 +309,7 @@ function defineConfig(configOrOptions = {}) {
|
|
|
292
309
|
} else {
|
|
293
310
|
config = mergeConfig({ server: { host: "::", port: 8080 } }, config);
|
|
294
311
|
}
|
|
295
|
-
return config;
|
|
312
|
+
return applyWatchDebounceDefaults(config);
|
|
296
313
|
};
|
|
297
314
|
}
|
|
298
315
|
export {
|