@lovable.dev/vite-tanstack-config 2.5.0-rc.0 → 2.5.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 CHANGED
@@ -332,9 +332,6 @@ function defineConfig(configOrOptions = {}) {
332
332
  const { command, mode } = env;
333
333
  const isSandbox = isSandboxEnvironment();
334
334
  const isDevBuild = command === "build" && mode === "development";
335
- if (isDevBuild) {
336
- process.env.NODE_ENV = "development";
337
- }
338
335
  let options;
339
336
  if (typeof configOrOptions === "function") {
340
337
  const userConfig = await Promise.resolve(configOrOptions(env));
@@ -444,9 +441,14 @@ function defineConfig(configOrOptions = {}) {
444
441
  }
445
442
  let config = {
446
443
  define: envDefine,
447
- // keepNames so minification doesn't rename components to single letters
448
- // in the DevTools tree (the dev react-dom is selected via NODE_ENV above).
449
- ...isDevBuild ? { esbuild: { keepNames: true } } : {},
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.
448
+ ...isDevBuild ? {
449
+ environments: { client: { define: { "process.env.NODE_ENV": JSON.stringify("development") } } },
450
+ esbuild: { keepNames: true }
451
+ } : {},
450
452
  // Match the build's CSS pipeline in dev. Vite uses PostCSS in dev and only
451
453
  // runs Lightning CSS at build, so build-time transforms (e.g. collapsing a
452
454
  // hand-written `-webkit-backdrop-filter` to the prefixed form Chrome ignores)
package/dist/index.js CHANGED
@@ -298,9 +298,6 @@ function defineConfig(configOrOptions = {}) {
298
298
  const { command, mode } = env;
299
299
  const isSandbox = isSandboxEnvironment();
300
300
  const isDevBuild = command === "build" && mode === "development";
301
- if (isDevBuild) {
302
- process.env.NODE_ENV = "development";
303
- }
304
301
  let options;
305
302
  if (typeof configOrOptions === "function") {
306
303
  const userConfig = await Promise.resolve(configOrOptions(env));
@@ -410,9 +407,14 @@ function defineConfig(configOrOptions = {}) {
410
407
  }
411
408
  let config = {
412
409
  define: envDefine,
413
- // keepNames so minification doesn't rename components to single letters
414
- // in the DevTools tree (the dev react-dom is selected via NODE_ENV above).
415
- ...isDevBuild ? { esbuild: { keepNames: true } } : {},
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.
414
+ ...isDevBuild ? {
415
+ environments: { client: { define: { "process.env.NODE_ENV": JSON.stringify("development") } } },
416
+ esbuild: { keepNames: true }
417
+ } : {},
416
418
  // Match the build's CSS pipeline in dev. Vite uses PostCSS in dev and only
417
419
  // runs Lightning CSS at build, so build-time transforms (e.g. collapsing a
418
420
  // hand-written `-webkit-backdrop-filter` to the prefixed form Chrome ignores)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovable.dev/vite-tanstack-config",
3
- "version": "2.5.0-rc.0",
3
+ "version": "2.5.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",