Skip to content

Commit

Permalink
fix(build): configure Bugsnag API key
Browse files Browse the repository at this point in the history
Fixes #1336.
  • Loading branch information
langri-sha authored and tcrammond committed Mar 11, 2019
1 parent 9f1a78a commit dbd3d1a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const config = f => (
) => {
const env = {
development: Boolean(development),
bugsnagApiKey: '7419717b29de539ab0fbe35dcd7ca19d',
production: Boolean(production),
release: Boolean(release),
version: pkg.version
Expand All @@ -28,7 +29,7 @@ const config = f => (
return f(env);
};

module.exports = config(async ({ development, production, release, version }) => ({
module.exports = config(async ({ development, bugsnagApiKey, production, release, version }) => ({
target: 'web',
context: path.resolve(__dirname, 'src'),
devtool: 'source-map',
Expand All @@ -55,7 +56,7 @@ module.exports = config(async ({ development, production, release, version }) =>
plugins: [
new EnvironmentPlugin({
API_URL: 'https://toggl.com/api',
BUGSNAG_API_KEY: await getBugsnagKey(),
BUGSNAG_API_KEY: bugsnagApiKey,
DEBUG: development,
GA_TRACKING_ID: 'UA-3215787-22',
VERSION: version
Expand Down Expand Up @@ -91,7 +92,7 @@ module.exports = config(async ({ development, production, release, version }) =>
]),
production && release &&
new BugsnagSourceMapUploaderPlugin({
apiKey: await getBugsnagKey(),
apiKey: bugsnagApiKey,
appVersion: version,
publicPath: 'togglbutton://',
overwrite: true /* Overwrites existing sourcemaps for this version */
Expand Down

0 comments on commit dbd3d1a

Please sign in to comment.