Created
February 22, 2020 21:27
-
-
Save ahmedengu/bfc4db455c6b101900381cbcb386ef8c to your computer and use it in GitHub Desktop.
Generate nextjs sourcemaps for Honeybadger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HoneybadgerSourceMapPlugin = require('@honeybadger-io/webpack'); | |
module.exports = { | |
webpack: (config, { | |
buildId, dev, isServer, defaultLoaders, webpack, | |
}) => { | |
if (!dev) { | |
config.plugins.push(new HoneybadgerSourceMapPlugin({ | |
apiKey: 'apiKey', | |
assetsUrl: process.env.ASSETS_URL || 'https://example.com/_next/static/*', | |
revision: buildId, | |
})); | |
} | |
return config; | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment