@lovable.dev/vite-tanstack-config 2.5.0-rc.2 → 2.5.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
@@ -441,10 +441,8 @@ function defineConfig(configOrOptions = {}) {
441
441
  }
442
442
  let config = {
443
443
  define: envDefine,
444
- // Give the client the dev react-dom React DevTools needs, scoped to the
445
- // client environment only: a global NODE_ENV flip would also make the JSX
446
- // transform emit jsxDEV, which the react-server SSR runtime can't resolve.
447
- // keepNames keeps component names readable in the DevTools tree.
444
+ // Client-scoped so React DevTools gets the dev react-dom; a global NODE_ENV
445
+ // flip would emit jsxDEV, which the react-server SSR runtime can't resolve.
448
446
  ...isDevBuild ? {
449
447
  environments: { client: { define: { "process.env.NODE_ENV": JSON.stringify("development") } } },
450
448
  esbuild: { keepNames: true }
@@ -468,6 +466,20 @@ function defineConfig(configOrOptions = {}) {
468
466
  "@tanstack/query-core"
469
467
  ]
470
468
  },
469
+ // Dep re-optimization rotates the optimized-dep hash and 504s tabs holding
470
+ // the old one; pre-bundle guaranteed deps and tolerate the stale requests.
471
+ optimizeDeps: {
472
+ include: [
473
+ "react",
474
+ "react-dom",
475
+ "react-dom/client",
476
+ "react/jsx-runtime",
477
+ "react/jsx-dev-runtime",
478
+ "@tanstack/react-router",
479
+ "@tanstack/react-start"
480
+ ],
481
+ ignoreOutdatedRequests: true
482
+ },
471
483
  plugins: [...internalPlugins, ...options.plugins ?? []]
472
484
  };
473
485
  if (options.vite) {
package/dist/index.js CHANGED
@@ -407,10 +407,8 @@ function defineConfig(configOrOptions = {}) {
407
407
  }
408
408
  let config = {
409
409
  define: envDefine,
410
- // Give the client the dev react-dom React DevTools needs, scoped to the
411
- // client environment only: a global NODE_ENV flip would also make the JSX
412
- // transform emit jsxDEV, which the react-server SSR runtime can't resolve.
413
- // keepNames keeps component names readable in the DevTools tree.
410
+ // Client-scoped so React DevTools gets the dev react-dom; a global NODE_ENV
411
+ // flip would emit jsxDEV, which the react-server SSR runtime can't resolve.
414
412
  ...isDevBuild ? {
415
413
  environments: { client: { define: { "process.env.NODE_ENV": JSON.stringify("development") } } },
416
414
  esbuild: { keepNames: true }
@@ -434,6 +432,20 @@ function defineConfig(configOrOptions = {}) {
434
432
  "@tanstack/query-core"
435
433
  ]
436
434
  },
435
+ // Dep re-optimization rotates the optimized-dep hash and 504s tabs holding
436
+ // the old one; pre-bundle guaranteed deps and tolerate the stale requests.
437
+ optimizeDeps: {
438
+ include: [
439
+ "react",
440
+ "react-dom",
441
+ "react-dom/client",
442
+ "react/jsx-runtime",
443
+ "react/jsx-dev-runtime",
444
+ "@tanstack/react-router",
445
+ "@tanstack/react-start"
446
+ ],
447
+ ignoreOutdatedRequests: true
448
+ },
437
449
  plugins: [...internalPlugins, ...options.plugins ?? []]
438
450
  };
439
451
  if (options.vite) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovable.dev/vite-tanstack-config",
3
- "version": "2.5.0-rc.2",
3
+ "version": "2.5.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",