@lovable.dev/vite-tanstack-config 2.0.0-rc.0 → 2.0.0-rc.1

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 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,8 @@ 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 userOutput = typeof userNitroOpts.output === "object" && userNitroOpts.output ? userNitroOpts.output : {};
301
- const output = { dir: "dist", ...userOutput };
302
- internalPlugins.push(nitro({ config: { ...userNitroOpts, preset, output } }));
305
+ const output = { dir: "dist", ...userNitroOpts.output ?? {} };
306
+ internalPlugins.push(nitro({ ...userNitroOpts, preset, output }));
303
307
  } catch {
304
308
  }
305
309
  }
package/dist/index.d.cts CHANGED
@@ -7,11 +7,19 @@ 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 (e.g. when the surrounding tanstackStart
11
- * version already delegates to Nitro internally). The deploy preset is
12
- * selected via `NITRO_PRESET` env var or `nitro.preset` here.
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?: Record<string, unknown> | false;
17
+ nitro?: {
18
+ preset?: string;
19
+ output?: {
20
+ dir?: string;
21
+ };
22
+ } | false;
15
23
  /** Options forwarded to tanstackStart(). */
16
24
  tanstackStart?: Record<string, unknown>;
17
25
  /** Options forwarded to viteReact(). */
package/dist/index.d.ts CHANGED
@@ -7,11 +7,19 @@ 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 (e.g. when the surrounding tanstackStart
11
- * version already delegates to Nitro internally). The deploy preset is
12
- * selected via `NITRO_PRESET` env var or `nitro.preset` here.
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?: Record<string, unknown> | false;
17
+ nitro?: {
18
+ preset?: string;
19
+ output?: {
20
+ dir?: string;
21
+ };
22
+ } | false;
15
23
  /** Options forwarded to tanstackStart(). */
16
24
  tanstackStart?: Record<string, unknown>;
17
25
  /** 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,8 @@ 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 userOutput = typeof userNitroOpts.output === "object" && userNitroOpts.output ? userNitroOpts.output : {};
267
- const output = { dir: "dist", ...userOutput };
268
- internalPlugins.push(nitro({ config: { ...userNitroOpts, preset, output } }));
271
+ const output = { dir: "dist", ...userNitroOpts.output ?? {} };
272
+ internalPlugins.push(nitro({ ...userNitroOpts, preset, output }));
269
273
  } catch {
270
274
  }
271
275
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovable.dev/vite-tanstack-config",
3
- "version": "2.0.0-rc.0",
3
+ "version": "2.0.0-rc.1",
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": "^3.0.0",
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.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",