From 75402b3315805917007f293ea642fc35899e5cac Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:51:18 -0400 Subject: [PATCH] Create esbuild config --- esbuild.config.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 esbuild.config.js 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, +});