diff --git a/esbuild.config.js b/esbuild.config.js new file mode 100644 index 0000000..bdd999d --- /dev/null +++ b/esbuild.config.js @@ -0,0 +1,15 @@ +import esbuild from "esbuild"; +import { sentryEsbuildPlugin } from "@sentry/esbuild-plugin"; + +const hasToken = typeof process.env.SENTRY_AUTH_TOKEN === "string"; + +esbuild.build({ + plugins: hasToken + ? [ + sentryEsbuildPlugin({ + authToken: process.env.SENTRY_AUTH_TOKEN, + }), + ] + : undefined, + sourcemap: hasToken, +});