@lovable.dev/vite-tanstack-config 2.3.0 → 2.3.1-rc.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 CHANGED
@@ -380,15 +380,10 @@ function defineConfig(configOrOptions = {}) {
380
380
  if (nitroMod) {
381
381
  const { nitro } = nitroMod;
382
382
  const userNitroOpts = typeof options.nitro === "object" && options.nitro ? options.nitro : {};
383
- const preset = userNitroOpts.preset ?? process.env.NITRO_PRESET ?? "cloudflare-module";
384
- const output = {
385
- dir: "dist",
386
- serverDir: "dist/server",
387
- publicDir: "dist/client",
388
- ...userNitroOpts.output
389
- };
390
- const nitroOpts = { ...userNitroOpts, preset, output };
391
- if (preset === "cloudflare-module") {
383
+ const nitroOpts = { preset: "cloudflare-module", ...userNitroOpts };
384
+ if (isSandbox) {
385
+ nitroOpts.preset = "cloudflare-module";
386
+ nitroOpts.output = { dir: "dist", serverDir: "dist/server", publicDir: "dist/client" };
392
387
  nitroOpts.cloudflare = { nodeCompat: true, deployConfig: true, ...userNitroOpts.cloudflare };
393
388
  }
394
389
  internalPlugins.push(nitro(nitroOpts));
package/dist/index.d.cts CHANGED
@@ -14,12 +14,14 @@ interface LovableViteTanstackOptions {
14
14
  * / `LOVABLE_SANDBOX`). Users who clone their project and self-deploy
15
15
  * on their own infra get a Vite-only build with no Cloudflare-specific
16
16
  * bundling.
17
- * - **`true`**: force-on with package defaults (`cloudflare-module` preset,
18
- * `dist/server` + `dist/client` layout). Use this in non-Lovable
19
- * environments where you still want the Nitro deploy bundle.
20
- * - **object**: force-on, with these overrides on top of the defaults.
17
+ * - **`true`**: force-on with the `cloudflare-module` preset.
18
+ * - **object**: force-on, with these overrides. Set `preset`
19
+ * (e.g. `{ preset: "vercel" }`) to host elsewhere from your own CI.
21
20
  * - **`false`**: skip nitro entirely.
22
21
  *
22
+ * Inside a Lovable build the preset and output layout are forced to
23
+ * Cloudflare; `preset`/`output`/`cloudflare` overrides apply only outside it.
24
+ *
23
25
  * The option surface is narrow on purpose — Nitro v3 is still pre-RC, so
24
26
  * we only expose stable build-time knobs to reduce churn if
25
27
  * `NitroPluginConfig` schema changes. File an issue if you need more.
package/dist/index.d.ts CHANGED
@@ -14,12 +14,14 @@ interface LovableViteTanstackOptions {
14
14
  * / `LOVABLE_SANDBOX`). Users who clone their project and self-deploy
15
15
  * on their own infra get a Vite-only build with no Cloudflare-specific
16
16
  * bundling.
17
- * - **`true`**: force-on with package defaults (`cloudflare-module` preset,
18
- * `dist/server` + `dist/client` layout). Use this in non-Lovable
19
- * environments where you still want the Nitro deploy bundle.
20
- * - **object**: force-on, with these overrides on top of the defaults.
17
+ * - **`true`**: force-on with the `cloudflare-module` preset.
18
+ * - **object**: force-on, with these overrides. Set `preset`
19
+ * (e.g. `{ preset: "vercel" }`) to host elsewhere from your own CI.
21
20
  * - **`false`**: skip nitro entirely.
22
21
  *
22
+ * Inside a Lovable build the preset and output layout are forced to
23
+ * Cloudflare; `preset`/`output`/`cloudflare` overrides apply only outside it.
24
+ *
23
25
  * The option surface is narrow on purpose — Nitro v3 is still pre-RC, so
24
26
  * we only expose stable build-time knobs to reduce churn if
25
27
  * `NitroPluginConfig` schema changes. File an issue if you need more.
package/dist/index.js CHANGED
@@ -346,15 +346,10 @@ function defineConfig(configOrOptions = {}) {
346
346
  if (nitroMod) {
347
347
  const { nitro } = nitroMod;
348
348
  const userNitroOpts = typeof options.nitro === "object" && options.nitro ? options.nitro : {};
349
- const preset = userNitroOpts.preset ?? process.env.NITRO_PRESET ?? "cloudflare-module";
350
- const output = {
351
- dir: "dist",
352
- serverDir: "dist/server",
353
- publicDir: "dist/client",
354
- ...userNitroOpts.output
355
- };
356
- const nitroOpts = { ...userNitroOpts, preset, output };
357
- if (preset === "cloudflare-module") {
349
+ const nitroOpts = { preset: "cloudflare-module", ...userNitroOpts };
350
+ if (isSandbox) {
351
+ nitroOpts.preset = "cloudflare-module";
352
+ nitroOpts.output = { dir: "dist", serverDir: "dist/server", publicDir: "dist/client" };
358
353
  nitroOpts.cloudflare = { nodeCompat: true, deployConfig: true, ...userNitroOpts.cloudflare };
359
354
  }
360
355
  internalPlugins.push(nitro(nitroOpts));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovable.dev/vite-tanstack-config",
3
- "version": "2.3.0",
3
+ "version": "2.3.1-rc.0",
4
4
  "description": "Vite config wrapper for Lovable TanStack Start projects",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",