Skip to content

Instantly share code, notes, and snippets.

@ahmedengu
Created February 22, 2020 21:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmedengu/bfc4db455c6b101900381cbcb386ef8c to your computer and use it in GitHub Desktop.
Save ahmedengu/bfc4db455c6b101900381cbcb386ef8c to your computer and use it in GitHub Desktop.
Generate nextjs sourcemaps for Honeybadger
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