fix(desktop): inject NODE_ENV into main and preload builds

Merged
SA
1y ago
+12-0

Summary

  • Fix production builds using .superset-dev instead of .superset
  • Inject NODE_ENV into main and preload process builds via Vite define
  • Defaults to "production" when not set (matches expected behavior for packaged apps)

Root cause

The renderer build had NODE_ENV: "production" injected via injectProcessEnvPlugin, but main/preload builds relied on process.env.NODE_ENV at runtime, which isn't set in packaged Electron apps.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated build configuration to ensure consistent environment variable handling across build pipelines.

✏️ Tip: You can customize this high-level summary in your review settings.