@lovable.dev/vite-tanstack-config 2.12.1 → 2.13.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/dev-server-bridge.cjs +551 -0
- package/dist/dev-server-bridge.d.cts +22 -0
- package/dist/dev-server-bridge.d.ts +22 -0
- package/dist/dev-server-bridge.js +548 -0
- package/dist/hmr-gate.cjs +329 -0
- package/dist/hmr-gate.d.cts +27 -0
- package/dist/hmr-gate.d.ts +27 -0
- package/dist/hmr-gate.js +326 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -5
- package/dist/index.d.ts +1 -5
- package/dist/index.js +2 -2
- package/package.json +43 -3
package/dist/hmr-gate.js
ADDED
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
//#region src/hmr-gate/index.ts
|
|
4
|
+
const statusCorsOriginRe = /^(?:https:\/\/(?:[^/]+\.)?lovable\.dev|https?:\/\/(?:(?:[^/:]+\.)?localhost|127\.0\.0\.1|\[::1\]))(?::\d+)?$/;
|
|
5
|
+
function requestPathname(req) {
|
|
6
|
+
const url = req.url ?? "";
|
|
7
|
+
const queryStart = url.indexOf("?");
|
|
8
|
+
return queryStart === -1 ? url : url.slice(0, queryStart);
|
|
9
|
+
}
|
|
10
|
+
function gateStatusHeaders(req) {
|
|
11
|
+
const origin = req.headers.origin;
|
|
12
|
+
const headers = {
|
|
13
|
+
"Content-Type": "application/json",
|
|
14
|
+
Vary: "Origin"
|
|
15
|
+
};
|
|
16
|
+
if (typeof origin === "string" && statusCorsOriginRe.test(origin)) headers["Access-Control-Allow-Origin"] = origin;
|
|
17
|
+
return headers;
|
|
18
|
+
}
|
|
19
|
+
const DEV_SERVER_MODE_EVENT = "lovable:dev-server-mode";
|
|
20
|
+
const EDIT_FREE_RELOAD_MARKER = "edit-free";
|
|
21
|
+
/** Host-controlled default for `fullReload`; an explicit option still wins. */
|
|
22
|
+
const FULL_RELOAD_ENV_VAR = "LOVABLE_HMR_FULL_RELOAD";
|
|
23
|
+
function hmrGatePlugin(options = {}) {
|
|
24
|
+
const fullReload = options.fullReload ?? process.env["LOVABLE_HMR_FULL_RELOAD"] !== "false";
|
|
25
|
+
const gatedEvents = new Set(options.events ?? [
|
|
26
|
+
"change",
|
|
27
|
+
"add",
|
|
28
|
+
"unlink"
|
|
29
|
+
]);
|
|
30
|
+
const passthroughPatterns = options.passthrough ?? [];
|
|
31
|
+
const pending = /* @__PURE__ */ new Map();
|
|
32
|
+
const lastFlushedHashes = /* @__PURE__ */ new Map();
|
|
33
|
+
let originalEmit = null;
|
|
34
|
+
let server = null;
|
|
35
|
+
let transportMode = false;
|
|
36
|
+
let swallowedUpdates = 0;
|
|
37
|
+
let heldReload = false;
|
|
38
|
+
let passthroughReloads = 0;
|
|
39
|
+
const wrappedSends = [];
|
|
40
|
+
const drainMs = options.drainMs ?? 1500;
|
|
41
|
+
const maxHoldMs = options.maxHoldMs ?? 24e4;
|
|
42
|
+
const startupGraceMs = options.startupGraceMs ?? 5e3;
|
|
43
|
+
let startupGraceUntil = 0;
|
|
44
|
+
const patchPathRe = /^\/hmr_patch_\d+\.js(\?|$)/;
|
|
45
|
+
const parked = [];
|
|
46
|
+
let drainUntil = 0;
|
|
47
|
+
let restartTimer = null;
|
|
48
|
+
let reloadNeededListener = null;
|
|
49
|
+
const bufferedReloadNeeded = /* @__PURE__ */ new Map();
|
|
50
|
+
const pendingReplay = /* @__PURE__ */ new Map();
|
|
51
|
+
let reloadFailOpenTimer = null;
|
|
52
|
+
function replayBufferedReloadNeeded() {
|
|
53
|
+
if (reloadNeededListener === null || bufferedReloadNeeded.size === 0) return;
|
|
54
|
+
const entries = Array.from(bufferedReloadNeeded.entries());
|
|
55
|
+
bufferedReloadNeeded.clear();
|
|
56
|
+
for (const [client, payload] of entries) reloadNeededListener(payload, client);
|
|
57
|
+
}
|
|
58
|
+
function releaseParked() {
|
|
59
|
+
const count = parked.length;
|
|
60
|
+
for (const entry of parked.splice(0)) entry.release();
|
|
61
|
+
return count;
|
|
62
|
+
}
|
|
63
|
+
function initialBuildPending() {
|
|
64
|
+
const bundled = server?.environments?.client?.bundledDev;
|
|
65
|
+
return bundled !== void 0 && bundled.initialBuildCompleted !== true;
|
|
66
|
+
}
|
|
67
|
+
function gateSendTarget(target) {
|
|
68
|
+
const original = target.send.bind(target);
|
|
69
|
+
wrappedSends.push({
|
|
70
|
+
target,
|
|
71
|
+
original
|
|
72
|
+
});
|
|
73
|
+
target.send = (...args) => {
|
|
74
|
+
const frame = args[0];
|
|
75
|
+
const type = frame?.type;
|
|
76
|
+
if (type === "update") {
|
|
77
|
+
swallowedUpdates++;
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (type === "full-reload") {
|
|
81
|
+
if (frame?.ifFallback === true || frame?.lovable?.hmrGate === EDIT_FREE_RELOAD_MARKER || Date.now() < startupGraceUntil || initialBuildPending()) {
|
|
82
|
+
passthroughReloads++;
|
|
83
|
+
return original(...args);
|
|
84
|
+
}
|
|
85
|
+
heldReload = true;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
return original(...args);
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function fileContentHash(filePath) {
|
|
92
|
+
try {
|
|
93
|
+
return createHash("sha1").update(readFileSync(filePath)).digest("hex");
|
|
94
|
+
} catch {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function isPassthrough(filePath) {
|
|
99
|
+
if (typeof filePath !== "string") return true;
|
|
100
|
+
if (filePath.includes("node_modules/.vite")) return true;
|
|
101
|
+
return passthroughPatterns.some((p) => filePath.includes(p));
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
name: "hmr-gate",
|
|
105
|
+
apply: "serve",
|
|
106
|
+
configResolved(config) {
|
|
107
|
+
transportMode = config.experimental?.bundledDev === true;
|
|
108
|
+
},
|
|
109
|
+
configureServer(srv) {
|
|
110
|
+
server = srv;
|
|
111
|
+
srv.ws.on?.("connection", (socket) => {
|
|
112
|
+
try {
|
|
113
|
+
socket.send(JSON.stringify({
|
|
114
|
+
type: "custom",
|
|
115
|
+
event: DEV_SERVER_MODE_EVENT,
|
|
116
|
+
data: { mode: transportMode ? "bundled" : "classic" }
|
|
117
|
+
}));
|
|
118
|
+
} catch {}
|
|
119
|
+
});
|
|
120
|
+
if (transportMode) {
|
|
121
|
+
const startedAtMs = Date.now();
|
|
122
|
+
startupGraceUntil = startedAtMs + startupGraceMs;
|
|
123
|
+
const ws = srv.ws;
|
|
124
|
+
const hot = srv.environments?.client?.hot;
|
|
125
|
+
const target = typeof ws?.send === "function" ? ws : hot;
|
|
126
|
+
if (target && typeof target.send === "function") gateSendTarget(target);
|
|
127
|
+
const hotChannel = hot;
|
|
128
|
+
if (hotChannel && typeof hotChannel.on === "function") {
|
|
129
|
+
const originalOn = hotChannel.on.bind(hotChannel);
|
|
130
|
+
hotChannel.on = (event, listener) => {
|
|
131
|
+
if (event !== "vite:bundled-dev:reload-needed") return originalOn(event, listener);
|
|
132
|
+
reloadNeededListener = listener;
|
|
133
|
+
originalOn(event, (payload, client) => {
|
|
134
|
+
if (Date.now() < startupGraceUntil || initialBuildPending()) return listener(payload, client);
|
|
135
|
+
bufferedReloadNeeded.set(client, payload);
|
|
136
|
+
if (reloadFailOpenTimer === null) {
|
|
137
|
+
reloadFailOpenTimer = setTimeout(() => {
|
|
138
|
+
reloadFailOpenTimer = null;
|
|
139
|
+
replayBufferedReloadNeeded();
|
|
140
|
+
}, maxHoldMs);
|
|
141
|
+
reloadFailOpenTimer.unref?.();
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
srv.middlewares.use((req, _res, next) => {
|
|
147
|
+
if (req.method === "GET" && patchPathRe.test(req.url ?? "") && Date.now() >= drainUntil) {
|
|
148
|
+
let released = false;
|
|
149
|
+
const release = () => {
|
|
150
|
+
if (released) return;
|
|
151
|
+
released = true;
|
|
152
|
+
clearTimeout(timer);
|
|
153
|
+
const index = parked.indexOf(entry);
|
|
154
|
+
if (index !== -1) parked.splice(index, 1);
|
|
155
|
+
next();
|
|
156
|
+
};
|
|
157
|
+
const timer = setTimeout(release, maxHoldMs);
|
|
158
|
+
timer.unref?.();
|
|
159
|
+
const entry = { release };
|
|
160
|
+
parked.push(entry);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
next();
|
|
164
|
+
});
|
|
165
|
+
srv.middlewares.use((req, res, next) => {
|
|
166
|
+
if (req.method !== "POST" || requestPathname(req) !== "/__hmr_flush") return next();
|
|
167
|
+
const priorDrainUntil = drainUntil;
|
|
168
|
+
const released = releaseParked();
|
|
169
|
+
drainUntil = Date.now() + drainMs;
|
|
170
|
+
const updates = swallowedUpdates;
|
|
171
|
+
swallowedUpdates = 0;
|
|
172
|
+
const broadcastHeld = heldReload;
|
|
173
|
+
heldReload = false;
|
|
174
|
+
const reload = broadcastHeld || bufferedReloadNeeded.size > 0;
|
|
175
|
+
let flushRestarts = false;
|
|
176
|
+
if (reload) {
|
|
177
|
+
const releaseDelayMs = Math.max(released > 0 ? drainMs : 0, priorDrainUntil - Date.now(), 0);
|
|
178
|
+
const restart = srv.restart;
|
|
179
|
+
if (restartTimer !== null) clearTimeout(restartTimer);
|
|
180
|
+
if (reloadFailOpenTimer !== null) {
|
|
181
|
+
clearTimeout(reloadFailOpenTimer);
|
|
182
|
+
reloadFailOpenTimer = null;
|
|
183
|
+
}
|
|
184
|
+
if (!broadcastHeld && bufferedReloadNeeded.size > 0 && reloadNeededListener !== null) {
|
|
185
|
+
for (const [client, payload] of bufferedReloadNeeded) pendingReplay.set(client, payload);
|
|
186
|
+
bufferedReloadNeeded.clear();
|
|
187
|
+
restartTimer = setTimeout(() => {
|
|
188
|
+
restartTimer = null;
|
|
189
|
+
const entries = Array.from(pendingReplay.entries());
|
|
190
|
+
pendingReplay.clear();
|
|
191
|
+
for (const [client, payload] of entries) reloadNeededListener?.(payload, client);
|
|
192
|
+
}, releaseDelayMs);
|
|
193
|
+
restartTimer.unref?.();
|
|
194
|
+
} else if (typeof restart === "function") {
|
|
195
|
+
flushRestarts = true;
|
|
196
|
+
bufferedReloadNeeded.clear();
|
|
197
|
+
pendingReplay.clear();
|
|
198
|
+
restartTimer = setTimeout(() => {
|
|
199
|
+
restartTimer = null;
|
|
200
|
+
restart.call(srv).catch(() => {
|
|
201
|
+
if (wrappedSends.length > 0) wrappedSends[0].original({ type: "full-reload" });
|
|
202
|
+
});
|
|
203
|
+
}, releaseDelayMs);
|
|
204
|
+
restartTimer.unref?.();
|
|
205
|
+
} else if (wrappedSends.length > 0) {
|
|
206
|
+
bufferedReloadNeeded.clear();
|
|
207
|
+
pendingReplay.clear();
|
|
208
|
+
wrappedSends[0].original({ type: "full-reload" });
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
const body = JSON.stringify({
|
|
212
|
+
flushed: [],
|
|
213
|
+
count: released + updates,
|
|
214
|
+
released,
|
|
215
|
+
reload,
|
|
216
|
+
restartsOnReload: flushRestarts,
|
|
217
|
+
mode: "transport-patch-hold"
|
|
218
|
+
});
|
|
219
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
|
220
|
+
res.end(body);
|
|
221
|
+
});
|
|
222
|
+
srv.middlewares.use((req, res, next) => {
|
|
223
|
+
if (req.method !== "GET" || requestPathname(req) !== "/__hmr_gate") return next();
|
|
224
|
+
const body = JSON.stringify({
|
|
225
|
+
enabled: true,
|
|
226
|
+
pending: {},
|
|
227
|
+
count: parked.length + swallowedUpdates + (heldReload || bufferedReloadNeeded.size > 0 ? 1 : 0),
|
|
228
|
+
heldReload: heldReload || bufferedReloadNeeded.size > 0,
|
|
229
|
+
restartsOnReload: reloadNeededListener === null || heldReload,
|
|
230
|
+
startedAt: startedAtMs,
|
|
231
|
+
passthroughReloads,
|
|
232
|
+
mode: "transport-patch-hold"
|
|
233
|
+
});
|
|
234
|
+
res.writeHead(200, gateStatusHeaders(req));
|
|
235
|
+
res.end(body);
|
|
236
|
+
});
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
const _emit = srv.watcher.emit.bind(srv.watcher);
|
|
240
|
+
originalEmit = _emit;
|
|
241
|
+
srv.watcher.emit = ((event, ...args) => {
|
|
242
|
+
if (typeof event === "string" && gatedEvents.has(event) && !isPassthrough(args[0])) {
|
|
243
|
+
const filePath = args[0];
|
|
244
|
+
if (event === "change" || event === "add") {
|
|
245
|
+
const hash = fileContentHash(filePath);
|
|
246
|
+
if (hash !== null && hash === lastFlushedHashes.get(filePath)) {
|
|
247
|
+
pending.delete(filePath);
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
let events = pending.get(filePath);
|
|
252
|
+
if (!events) {
|
|
253
|
+
events = /* @__PURE__ */ new Set();
|
|
254
|
+
pending.set(filePath, events);
|
|
255
|
+
}
|
|
256
|
+
events.add(event);
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
return _emit(event, ...args);
|
|
260
|
+
});
|
|
261
|
+
srv.middlewares.use((req, res, next) => {
|
|
262
|
+
if (req.method !== "POST" || requestPathname(req) !== "/__hmr_flush") return next();
|
|
263
|
+
const entries = Array.from(pending.entries());
|
|
264
|
+
pending.clear();
|
|
265
|
+
for (const [f] of entries) srv.moduleGraph.onFileChange(f);
|
|
266
|
+
if (entries.length > 0) {
|
|
267
|
+
for (const [f, events] of entries) {
|
|
268
|
+
for (const event of events) _emit(event, f);
|
|
269
|
+
const hash = fileContentHash(f);
|
|
270
|
+
if (hash === null) lastFlushedHashes.delete(f);
|
|
271
|
+
else lastFlushedHashes.set(f, hash);
|
|
272
|
+
}
|
|
273
|
+
if (fullReload) srv.ws.send({ type: "full-reload" });
|
|
274
|
+
}
|
|
275
|
+
const files = entries.map(([f]) => f);
|
|
276
|
+
const body = JSON.stringify({
|
|
277
|
+
flushed: files,
|
|
278
|
+
count: entries.length,
|
|
279
|
+
mode: fullReload ? "full-reload" : "granular"
|
|
280
|
+
});
|
|
281
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
|
282
|
+
res.end(body);
|
|
283
|
+
});
|
|
284
|
+
srv.middlewares.use((req, res, next) => {
|
|
285
|
+
if (req.method !== "GET" || requestPathname(req) !== "/__hmr_gate") return next();
|
|
286
|
+
const serialized = {};
|
|
287
|
+
for (const [f, events] of pending) serialized[f] = Array.from(events);
|
|
288
|
+
const body = JSON.stringify({
|
|
289
|
+
enabled: true,
|
|
290
|
+
pending: serialized,
|
|
291
|
+
count: pending.size,
|
|
292
|
+
mode: fullReload ? "full-reload" : "granular"
|
|
293
|
+
});
|
|
294
|
+
res.writeHead(200, gateStatusHeaders(req));
|
|
295
|
+
res.end(body);
|
|
296
|
+
});
|
|
297
|
+
},
|
|
298
|
+
closeWatcher() {
|
|
299
|
+
if (server && originalEmit) server.watcher.emit = originalEmit;
|
|
300
|
+
for (const { target, original } of wrappedSends) target.send = original;
|
|
301
|
+
wrappedSends.length = 0;
|
|
302
|
+
if (restartTimer !== null) {
|
|
303
|
+
clearTimeout(restartTimer);
|
|
304
|
+
restartTimer = null;
|
|
305
|
+
}
|
|
306
|
+
releaseParked();
|
|
307
|
+
if (reloadFailOpenTimer !== null) {
|
|
308
|
+
clearTimeout(reloadFailOpenTimer);
|
|
309
|
+
reloadFailOpenTimer = null;
|
|
310
|
+
}
|
|
311
|
+
bufferedReloadNeeded.clear();
|
|
312
|
+
pendingReplay.clear();
|
|
313
|
+
reloadNeededListener = null;
|
|
314
|
+
swallowedUpdates = 0;
|
|
315
|
+
heldReload = false;
|
|
316
|
+
passthroughReloads = 0;
|
|
317
|
+
drainUntil = 0;
|
|
318
|
+
pending.clear();
|
|
319
|
+
lastFlushedHashes.clear();
|
|
320
|
+
server = null;
|
|
321
|
+
originalEmit = null;
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
//#endregion
|
|
326
|
+
export { DEV_SERVER_MODE_EVENT, FULL_RELOAD_ENV_VAR, hmrGatePlugin };
|
package/dist/index.cjs
CHANGED
|
@@ -717,13 +717,13 @@ function defineConfig(configOrOptions = {}) {
|
|
|
717
717
|
if (command === "serve") {
|
|
718
718
|
const hmrGateOpt = options.hmrGate;
|
|
719
719
|
if (isSandbox ? hmrGateOpt !== false : !!hmrGateOpt) {
|
|
720
|
-
const { hmrGatePlugin } = await
|
|
720
|
+
const { hmrGatePlugin } = await Promise.resolve().then(() => require("./hmr-gate.cjs"));
|
|
721
721
|
const hmrGateOptions = typeof hmrGateOpt === "object" ? hmrGateOpt : {};
|
|
722
722
|
internalPlugins.push(hmrGatePlugin(hmrGateOptions));
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
725
|
if (command === "serve" && isSandbox) {
|
|
726
|
-
const { devServerBridgePlugin } = await
|
|
726
|
+
const { devServerBridgePlugin } = await Promise.resolve().then(() => require("./dev-server-bridge.cjs"));
|
|
727
727
|
internalPlugins.push(devServerBridgePlugin());
|
|
728
728
|
}
|
|
729
729
|
if (command === "serve") internalPlugins.push(lovableAssetsProxyPlugin());
|
package/dist/index.d.cts
CHANGED
|
@@ -58,11 +58,7 @@ interface LovableViteTanstackOptions {
|
|
|
58
58
|
react?: Record<string, unknown>;
|
|
59
59
|
/** Set to false to disable automatic VITE_* env define injection. Default: true. */
|
|
60
60
|
envDefine?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Options for the HMR gate plugin (@lovable.dev/vite-plugin-hmr-gate).
|
|
63
|
-
* Enabled by default in sandbox mode. Set to false to disable, or pass options
|
|
64
|
-
* to customise behaviour. Set to true or an options object to enable outside sandbox.
|
|
65
|
-
*/
|
|
61
|
+
/** hmrGatePlugin() options. Default on in sandbox (false disables); true or an options object enables elsewhere. */
|
|
66
62
|
hmrGate?: boolean | Record<string, unknown>;
|
|
67
63
|
}
|
|
68
64
|
declare function defineConfig(config: UserConfig): (env: ConfigEnv) => Promise<UserConfig>;
|
package/dist/index.d.ts
CHANGED
|
@@ -58,11 +58,7 @@ interface LovableViteTanstackOptions {
|
|
|
58
58
|
react?: Record<string, unknown>;
|
|
59
59
|
/** Set to false to disable automatic VITE_* env define injection. Default: true. */
|
|
60
60
|
envDefine?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Options for the HMR gate plugin (@lovable.dev/vite-plugin-hmr-gate).
|
|
63
|
-
* Enabled by default in sandbox mode. Set to false to disable, or pass options
|
|
64
|
-
* to customise behaviour. Set to true or an options object to enable outside sandbox.
|
|
65
|
-
*/
|
|
61
|
+
/** hmrGatePlugin() options. Default on in sandbox (false disables); true or an options object enables elsewhere. */
|
|
66
62
|
hmrGate?: boolean | Record<string, unknown>;
|
|
67
63
|
}
|
|
68
64
|
declare function defineConfig(config: UserConfig): (env: ConfigEnv) => Promise<UserConfig>;
|
package/dist/index.js
CHANGED
|
@@ -693,13 +693,13 @@ function defineConfig(configOrOptions = {}) {
|
|
|
693
693
|
if (command === "serve") {
|
|
694
694
|
const hmrGateOpt = options.hmrGate;
|
|
695
695
|
if (isSandbox ? hmrGateOpt !== false : !!hmrGateOpt) {
|
|
696
|
-
const { hmrGatePlugin } = await import("
|
|
696
|
+
const { hmrGatePlugin } = await import("./hmr-gate.js");
|
|
697
697
|
const hmrGateOptions = typeof hmrGateOpt === "object" ? hmrGateOpt : {};
|
|
698
698
|
internalPlugins.push(hmrGatePlugin(hmrGateOptions));
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
701
|
if (command === "serve" && isSandbox) {
|
|
702
|
-
const { devServerBridgePlugin } = await import("
|
|
702
|
+
const { devServerBridgePlugin } = await import("./dev-server-bridge.js");
|
|
703
703
|
internalPlugins.push(devServerBridgePlugin());
|
|
704
704
|
}
|
|
705
705
|
if (command === "serve") internalPlugins.push(lovableAssetsProxyPlugin());
|
package/package.json
CHANGED
|
@@ -1,11 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovable.dev/vite-tanstack-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"description": "Vite config wrapper for Lovable TanStack Start projects",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./dist/index.d.cts",
|
|
17
|
+
"default": "./dist/index.cjs"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"./hmr-gate": {
|
|
21
|
+
"import": {
|
|
22
|
+
"types": "./dist/hmr-gate.d.ts",
|
|
23
|
+
"default": "./dist/hmr-gate.js"
|
|
24
|
+
},
|
|
25
|
+
"require": {
|
|
26
|
+
"types": "./dist/hmr-gate.d.cts",
|
|
27
|
+
"default": "./dist/hmr-gate.cjs"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"./dev-server-bridge": {
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/dev-server-bridge.d.ts",
|
|
33
|
+
"default": "./dist/dev-server-bridge.js"
|
|
34
|
+
},
|
|
35
|
+
"require": {
|
|
36
|
+
"types": "./dist/dev-server-bridge.d.cts",
|
|
37
|
+
"default": "./dist/dev-server-bridge.cjs"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"typesVersions": {
|
|
42
|
+
"*": {
|
|
43
|
+
"hmr-gate": [
|
|
44
|
+
"./dist/hmr-gate.d.ts"
|
|
45
|
+
],
|
|
46
|
+
"dev-server-bridge": [
|
|
47
|
+
"./dist/dev-server-bridge.d.ts"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
9
51
|
"files": [
|
|
10
52
|
"dist",
|
|
11
53
|
"runtime"
|
|
@@ -18,8 +60,6 @@
|
|
|
18
60
|
],
|
|
19
61
|
"license": "MIT",
|
|
20
62
|
"dependencies": {
|
|
21
|
-
"@lovable.dev/vite-plugin-dev-server-bridge": "^1.2.1",
|
|
22
|
-
"@lovable.dev/vite-plugin-hmr-gate": "^1.6.1",
|
|
23
63
|
"@tanstack/devtools-vite": "^0.8.1",
|
|
24
64
|
"lightningcss": "^1.30.0"
|
|
25
65
|
},
|