@lovable.dev/vite-tanstack-config 2.0.0-rc.0 → 2.0.0-rc.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 +12 -3
- package/dist/index.d.cts +14 -4
- package/dist/index.d.ts +14 -4
- package/dist/index.js +12 -3
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -266,6 +266,11 @@ function defineConfig(configOrOptions = {}) {
|
|
|
266
266
|
options = { vite: await configOrOptions };
|
|
267
267
|
} else {
|
|
268
268
|
const optionObject = configOrOptions && typeof configOrOptions === "object" ? configOrOptions : {};
|
|
269
|
+
if ("cloudflare" in optionObject) {
|
|
270
|
+
logWarning(
|
|
271
|
+
"The `cloudflare` option was removed in v2. Use `nitro: false` to disable the deploy plugin, or `nitro: { preset: '...' }` to configure it. The `cloudflare` setting is being ignored."
|
|
272
|
+
);
|
|
273
|
+
}
|
|
269
274
|
const hasLovableKey = "vite" in optionObject || "serverFnErrorLogger" in optionObject || "ssrErrorLogger" in optionObject || "nitro" in optionObject || "tanstackStart" in optionObject || "react" in optionObject || "envDefine" in optionObject || "hmrGate" in optionObject;
|
|
270
275
|
options = hasLovableKey ? optionObject : { vite: optionObject };
|
|
271
276
|
}
|
|
@@ -297,9 +302,13 @@ function defineConfig(configOrOptions = {}) {
|
|
|
297
302
|
const { nitro } = await import("nitro/vite");
|
|
298
303
|
const userNitroOpts = typeof options.nitro === "object" && options.nitro ? options.nitro : {};
|
|
299
304
|
const preset = userNitroOpts.preset ?? process.env.NITRO_PRESET ?? "cloudflare-module";
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
|
|
305
|
+
const output = {
|
|
306
|
+
dir: "dist",
|
|
307
|
+
serverDir: "dist/server",
|
|
308
|
+
publicDir: "dist/client",
|
|
309
|
+
...userNitroOpts.output ?? {}
|
|
310
|
+
};
|
|
311
|
+
internalPlugins.push(nitro({ ...userNitroOpts, preset, output }));
|
|
303
312
|
} catch {
|
|
304
313
|
}
|
|
305
314
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -7,11 +7,21 @@ interface LovableViteTanstackOptions {
|
|
|
7
7
|
ssrErrorLogger?: boolean;
|
|
8
8
|
/**
|
|
9
9
|
* Options forwarded to `nitro()` from `nitro/vite`. Set to `false` to skip
|
|
10
|
-
* the Nitro build plugin entirely
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* the Nitro build plugin entirely. The preset is selected via `NITRO_PRESET`
|
|
11
|
+
* env var or `nitro.preset` here; `output.dir` defaults to `dist`.
|
|
12
|
+
*
|
|
13
|
+
* Narrow surface on purpose — Nitro v3 is still pre-RC, so we only expose
|
|
14
|
+
* stable build-time knobs to reduce churn if `NitroPluginConfig` schema
|
|
15
|
+
* changes. File an issue if you need to set a different field.
|
|
13
16
|
*/
|
|
14
|
-
nitro?:
|
|
17
|
+
nitro?: {
|
|
18
|
+
preset?: string;
|
|
19
|
+
output?: {
|
|
20
|
+
dir?: string;
|
|
21
|
+
publicDir?: string;
|
|
22
|
+
serverDir?: string;
|
|
23
|
+
};
|
|
24
|
+
} | false;
|
|
15
25
|
/** Options forwarded to tanstackStart(). */
|
|
16
26
|
tanstackStart?: Record<string, unknown>;
|
|
17
27
|
/** Options forwarded to viteReact(). */
|
package/dist/index.d.ts
CHANGED
|
@@ -7,11 +7,21 @@ interface LovableViteTanstackOptions {
|
|
|
7
7
|
ssrErrorLogger?: boolean;
|
|
8
8
|
/**
|
|
9
9
|
* Options forwarded to `nitro()` from `nitro/vite`. Set to `false` to skip
|
|
10
|
-
* the Nitro build plugin entirely
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* the Nitro build plugin entirely. The preset is selected via `NITRO_PRESET`
|
|
11
|
+
* env var or `nitro.preset` here; `output.dir` defaults to `dist`.
|
|
12
|
+
*
|
|
13
|
+
* Narrow surface on purpose — Nitro v3 is still pre-RC, so we only expose
|
|
14
|
+
* stable build-time knobs to reduce churn if `NitroPluginConfig` schema
|
|
15
|
+
* changes. File an issue if you need to set a different field.
|
|
13
16
|
*/
|
|
14
|
-
nitro?:
|
|
17
|
+
nitro?: {
|
|
18
|
+
preset?: string;
|
|
19
|
+
output?: {
|
|
20
|
+
dir?: string;
|
|
21
|
+
publicDir?: string;
|
|
22
|
+
serverDir?: string;
|
|
23
|
+
};
|
|
24
|
+
} | false;
|
|
15
25
|
/** Options forwarded to tanstackStart(). */
|
|
16
26
|
tanstackStart?: Record<string, unknown>;
|
|
17
27
|
/** Options forwarded to viteReact(). */
|
package/dist/index.js
CHANGED
|
@@ -232,6 +232,11 @@ function defineConfig(configOrOptions = {}) {
|
|
|
232
232
|
options = { vite: await configOrOptions };
|
|
233
233
|
} else {
|
|
234
234
|
const optionObject = configOrOptions && typeof configOrOptions === "object" ? configOrOptions : {};
|
|
235
|
+
if ("cloudflare" in optionObject) {
|
|
236
|
+
logWarning(
|
|
237
|
+
"The `cloudflare` option was removed in v2. Use `nitro: false` to disable the deploy plugin, or `nitro: { preset: '...' }` to configure it. The `cloudflare` setting is being ignored."
|
|
238
|
+
);
|
|
239
|
+
}
|
|
235
240
|
const hasLovableKey = "vite" in optionObject || "serverFnErrorLogger" in optionObject || "ssrErrorLogger" in optionObject || "nitro" in optionObject || "tanstackStart" in optionObject || "react" in optionObject || "envDefine" in optionObject || "hmrGate" in optionObject;
|
|
236
241
|
options = hasLovableKey ? optionObject : { vite: optionObject };
|
|
237
242
|
}
|
|
@@ -263,9 +268,13 @@ function defineConfig(configOrOptions = {}) {
|
|
|
263
268
|
const { nitro } = await import("nitro/vite");
|
|
264
269
|
const userNitroOpts = typeof options.nitro === "object" && options.nitro ? options.nitro : {};
|
|
265
270
|
const preset = userNitroOpts.preset ?? process.env.NITRO_PRESET ?? "cloudflare-module";
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
271
|
+
const output = {
|
|
272
|
+
dir: "dist",
|
|
273
|
+
serverDir: "dist/server",
|
|
274
|
+
publicDir: "dist/client",
|
|
275
|
+
...userNitroOpts.output ?? {}
|
|
276
|
+
};
|
|
277
|
+
internalPlugins.push(nitro({ ...userNitroOpts, preset, output }));
|
|
269
278
|
} catch {
|
|
270
279
|
}
|
|
271
280
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovable.dev/vite-tanstack-config",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.2",
|
|
4
4
|
"description": "Vite config wrapper for Lovable TanStack Start projects",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"vite": ">=5.0.0 <9.0.0",
|
|
26
26
|
"@tailwindcss/vite": ">=4.0.0",
|
|
27
27
|
"vite-tsconfig-paths": ">=6.0.0",
|
|
28
|
-
"nitro": "
|
|
28
|
+
"nitro": ">=3.0.260429-beta",
|
|
29
29
|
"@tanstack/react-start": ">=1.100.0",
|
|
30
30
|
"@vitejs/plugin-react": ">=4.0.0"
|
|
31
31
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"nitro": "3.0.
|
|
38
|
+
"nitro": "3.0.260429-beta",
|
|
39
39
|
"@tanstack/react-start": "^1.162.9",
|
|
40
40
|
"@vitejs/plugin-react": "^4.5.2",
|
|
41
41
|
"@tailwindcss/vite": "^4.2.1",
|