-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: esbuild plugin #1318
feat: esbuild plugin #1318
Conversation
Refs: #1236
packages/react-native/example/package-lock.json | ||
packages/nextjs/examples/app-router/package-lock.json | ||
packages/nextjs/examples/pages-router/package-lock.json | ||
cache-dependency-path: package-lock.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These aren't necessary anymore since we aren't installing packages in the example folders.
@@ -0,0 +1,113 @@ | |||
# Honeybadger's esbuild Source Map Plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this is a copy-paste from the Rollup README.
@@ -0,0 +1,7 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are not installing deps in example apps, we need this eslint configuration to ignore the dependency not found error.
"description": "Esbuild plugin to upload source maps to Honeybadger's API - http://docs.honeybadger.io/guides/source-maps.html", | ||
"main": "./dist/index.js", | ||
"scripts": { | ||
"build": "tsc", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could've have used esbuild to actually transpile the Typescript code into javascript, but esbuild does not support type declarations, so I went with Typescript's compiler.
} | ||
|
||
// need to set write to false to get the outputFiles | ||
build.initialOptions.write = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently we have to disable writing to disk in order to get the output files, so we do that ourselves below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! I appreciated the initial PR comments/self-review that you did on this PR.
Status
READY
Description
Refs: #1236.
Creates an esbuild-plugin to automatically upload source maps and send deploy notifications to Honeybadger.
Todos