Add environment variable injection to esbuild config (#6225)

* Add environment variable injection to esbuild config

Inject TELEMETRY_SERVICE_API_KEY, ERROR_SERVICE_API_KEY, and CLINE_ENVIRONMENT
at build time for production builds.

* add changeset

* update
This commit is contained in:
Bee authored and GitHub committed 2025-09-15 11:18:36 -07:00
1 parent 7ecf395a9a
commit fe37ca9f29
2 files changed
+12 -1

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Add environment variable injection to esbuild config
+7 -1
View File
@@ -130,8 +130,14 @@ const baseConfig = {
sourcemap: !production,
logLevel: "silent",
define: production
? { "import.meta.url": "_importMetaUrl", "process.env.IS_DEV": JSON.stringify(!production) }
? {
"import.meta.url": "_importMetaUrl",
"process.env.IS_DEV": JSON.stringify(!production),
"process.env.TELEMETRY_SERVICE_API_KEY": JSON.stringify(process.env.TELEMETRY_SERVICE_API_KEY || ""),
"process.env.ERROR_SERVICE_API_KEY": JSON.stringify(process.env.ERROR_SERVICE_API_KEY || ""),
}
: { "import.meta.url": "_importMetaUrl" },
tsconfig: path.resolve(__dirname, "tsconfig.json"),
plugins: [
copyWasmFiles,