-
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
chore(webpack): set up basic example project to test plugin against #1207
Conversation
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.
Nothing blocking, but I left some comments.
const Honeybadger = require('@honeybadger-io/js'); | ||
|
||
Honeybadger.configure({ | ||
apiKey: (prompt('Enter the API key for your Honeybadger project:')), |
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 HONEYBADGER_API_KEY
is required to be passed as an env variable for this example app, you could read it from there using the EnvironmentPlugin.
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 do think that would work for our testing purposes, but I don't think it's the example we necessarily want to set for our users. From those docs it looks like this will put the API key into the bundled code as a string, which would expose it publicly.
I didn't intend this little example to be about the main HB functionality... really just about the sourcemap and deploy upload, but I still wouldn't want to publish something that if copy/pasted could cause user API keys to be public.
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.
👍 Gotcha.
Btw, API keys on the client side are exposed publicly anyway in some way or another. Best we can do is hide them under minified/uglified code, but they are exposed nevertheless.
Status
READY
Description
In working on #1013, I found I needed a basic project to test sourcemap upload and deploy notifications. I decided to set up the project first so I could see the behavior on the existing package before making changes.
Steps to Test or Reproduce
You should see