Skip to content

Commit

Permalink
Chore: Add Sentry source maps
Browse files Browse the repository at this point in the history
Because:
- It will help us diagnose JavaScript exceptions
  • Loading branch information
KevinMulhern committed Aug 10, 2024
1 parent 64cfc2b commit de75375
Show file tree
Hide file tree
Showing 4 changed files with 240 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,6 @@ yarn-debug.log*
!/app/assets/builds/.keep

# Ruby tool versions
.tool-versions
.tool-versions
# Sentry Config File
.env.sentry-build-plugin
6 changes: 6 additions & 0 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import chokidar from 'chokidar'
import http from 'http'
import { setTimeout } from 'timers/promises'
import { prismjsPlugin } from 'esbuild-plugin-prismjs'
const { sentryEsbuildPlugin } = require("@sentry/esbuild-plugin");

const clients = []
const entryPoints = ["main.js"]
Expand All @@ -34,6 +35,11 @@ const config = {
outdir: path.join(process.cwd(), "app/assets/builds"),
plugins: [
rails(),
sentryEsbuildPlugin({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "the-odin-project-web-app",
project: "the-odin-project",
}),
prismjsPlugin({
inline: true,
languages: [
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@hotwired/stimulus": "^3.2.2",
"@hotwired/turbo-rails": "^8.0.2",
"@rails/request.js": "^0.0.9",
"@sentry/esbuild-plugin": "^2.22.0",
"@stimulus/polyfills": "^2.0.0",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
Expand Down
Loading

0 comments on commit de75375

Please sign in to comment.