@lovable.dev/vite-tanstack-config 2.23.0 → 2.23.2
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 +23 -1
- package/dist/index.js +23 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -26,6 +26,7 @@ let node_url = require("node:url");
|
|
|
26
26
|
let vite = require("vite");
|
|
27
27
|
let node_https = require("node:https");
|
|
28
28
|
node_https = __toESM(node_https, 1);
|
|
29
|
+
let node_fs_promises = require("node:fs/promises");
|
|
29
30
|
//#region src/assetsProxyPlugin.ts
|
|
30
31
|
const ASSET_RE = /^\/__l5e\/assets-v1\//;
|
|
31
32
|
const PREVIEW_HOST_ENV = "LOVABLE_PREVIEW_HOST";
|
|
@@ -153,7 +154,7 @@ function bundledDevCssUrlShim() {
|
|
|
153
154
|
//#endregion
|
|
154
155
|
//#region package.json
|
|
155
156
|
var name = "@lovable.dev/vite-tanstack-config";
|
|
156
|
-
var version = "2.23.
|
|
157
|
+
var version = "2.23.2";
|
|
157
158
|
//#endregion
|
|
158
159
|
//#region src/logging.ts
|
|
159
160
|
const PACKAGE_NAME = "@lovable.dev/vite-tanstack-config";
|
|
@@ -367,6 +368,26 @@ function createDocumentSet(routerBasePath) {
|
|
|
367
368
|
};
|
|
368
369
|
}
|
|
369
370
|
//#endregion
|
|
371
|
+
//#region src/linkedDependencies.ts
|
|
372
|
+
function linkedDependenciesPlugin() {
|
|
373
|
+
return {
|
|
374
|
+
name: "lovable-linked-dependencies",
|
|
375
|
+
apply: "serve",
|
|
376
|
+
async configResolved(config) {
|
|
377
|
+
let dependencies;
|
|
378
|
+
let root;
|
|
379
|
+
try {
|
|
380
|
+
root = await (0, node_fs_promises.realpath)(config.root);
|
|
381
|
+
dependencies = await (0, node_fs_promises.realpath)((0, node_path.join)(root, "node_modules"));
|
|
382
|
+
} catch {
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
if (dependencies.startsWith(root + node_path.sep)) return;
|
|
386
|
+
if (!config.server.fs.allow.includes(dependencies)) config.server.fs.allow.push(dependencies);
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
//#endregion
|
|
370
391
|
//#region src/routes.ts
|
|
371
392
|
const ROUTE_MANIFEST_VERSION = 1;
|
|
372
393
|
const GENERATOR = `${name}@${version}`;
|
|
@@ -1593,6 +1614,7 @@ function defineConfig(configOrOptions = {}) {
|
|
|
1593
1614
|
}
|
|
1594
1615
|
}
|
|
1595
1616
|
if (command === "serve" && isSandbox) {
|
|
1617
|
+
internalPlugins.push(linkedDependenciesPlugin());
|
|
1596
1618
|
const { devServerBridgePlugin } = await Promise.resolve().then(() => require("./dev-server-bridge.cjs"));
|
|
1597
1619
|
internalPlugins.push(devServerBridgePlugin());
|
|
1598
1620
|
}
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import { basename, extname, join, relative, resolve, sep } from "node:path";
|
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
import { loadEnv, mergeConfig } from "vite";
|
|
4
4
|
import https from "node:https";
|
|
5
|
+
import { realpath } from "node:fs/promises";
|
|
5
6
|
//#region src/assetsProxyPlugin.ts
|
|
6
7
|
const ASSET_RE = /^\/__l5e\/assets-v1\//;
|
|
7
8
|
const PREVIEW_HOST_ENV = "LOVABLE_PREVIEW_HOST";
|
|
@@ -129,7 +130,7 @@ function bundledDevCssUrlShim() {
|
|
|
129
130
|
//#endregion
|
|
130
131
|
//#region package.json
|
|
131
132
|
var name = "@lovable.dev/vite-tanstack-config";
|
|
132
|
-
var version = "2.23.
|
|
133
|
+
var version = "2.23.2";
|
|
133
134
|
//#endregion
|
|
134
135
|
//#region src/logging.ts
|
|
135
136
|
const PACKAGE_NAME = "@lovable.dev/vite-tanstack-config";
|
|
@@ -343,6 +344,26 @@ function createDocumentSet(routerBasePath) {
|
|
|
343
344
|
};
|
|
344
345
|
}
|
|
345
346
|
//#endregion
|
|
347
|
+
//#region src/linkedDependencies.ts
|
|
348
|
+
function linkedDependenciesPlugin() {
|
|
349
|
+
return {
|
|
350
|
+
name: "lovable-linked-dependencies",
|
|
351
|
+
apply: "serve",
|
|
352
|
+
async configResolved(config) {
|
|
353
|
+
let dependencies;
|
|
354
|
+
let root;
|
|
355
|
+
try {
|
|
356
|
+
root = await realpath(config.root);
|
|
357
|
+
dependencies = await realpath(join(root, "node_modules"));
|
|
358
|
+
} catch {
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
if (dependencies.startsWith(root + sep)) return;
|
|
362
|
+
if (!config.server.fs.allow.includes(dependencies)) config.server.fs.allow.push(dependencies);
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
//#endregion
|
|
346
367
|
//#region src/routes.ts
|
|
347
368
|
const ROUTE_MANIFEST_VERSION = 1;
|
|
348
369
|
const GENERATOR = `${name}@${version}`;
|
|
@@ -1569,6 +1590,7 @@ function defineConfig(configOrOptions = {}) {
|
|
|
1569
1590
|
}
|
|
1570
1591
|
}
|
|
1571
1592
|
if (command === "serve" && isSandbox) {
|
|
1593
|
+
internalPlugins.push(linkedDependenciesPlugin());
|
|
1572
1594
|
const { devServerBridgePlugin } = await import("./dev-server-bridge.js");
|
|
1573
1595
|
internalPlugins.push(devServerBridgePlugin());
|
|
1574
1596
|
}
|