@lovable.dev/vite-tanstack-config 2.4.2 → 2.5.0-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
@@ -331,6 +331,10 @@ function defineConfig(configOrOptions = {}) {
331
331
  return async (env) => {
332
332
  const { command, mode } = env;
333
333
  const isSandbox = isSandboxEnvironment();
334
+ const isDevBuild = command === "build" && mode === "development";
335
+ if (isDevBuild) {
336
+ process.env.NODE_ENV = "development";
337
+ }
334
338
  let options;
335
339
  if (typeof configOrOptions === "function") {
336
340
  const userConfig = await Promise.resolve(configOrOptions(env));
@@ -440,6 +444,9 @@ function defineConfig(configOrOptions = {}) {
440
444
  }
441
445
  let config = {
442
446
  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 } } : {},
443
450
  // Match the build's CSS pipeline in dev. Vite uses PostCSS in dev and only
444
451
  // runs Lightning CSS at build, so build-time transforms (e.g. collapsing a
445
452
  // hand-written `-webkit-backdrop-filter` to the prefixed form Chrome ignores)
package/dist/index.js CHANGED
@@ -297,6 +297,10 @@ function defineConfig(configOrOptions = {}) {
297
297
  return async (env) => {
298
298
  const { command, mode } = env;
299
299
  const isSandbox = isSandboxEnvironment();
300
+ const isDevBuild = command === "build" && mode === "development";
301
+ if (isDevBuild) {
302
+ process.env.NODE_ENV = "development";
303
+ }
300
304
  let options;
301
305
  if (typeof configOrOptions === "function") {
302
306
  const userConfig = await Promise.resolve(configOrOptions(env));
@@ -406,6 +410,9 @@ function defineConfig(configOrOptions = {}) {
406
410
  }
407
411
  let config = {
408
412
  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 } } : {},
409
416
  // Match the build's CSS pipeline in dev. Vite uses PostCSS in dev and only
410
417
  // runs Lightning CSS at build, so build-time transforms (e.g. collapsing a
411
418
  // 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.4.2",
3
+ "version": "2.5.0-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",