Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

getsentry/next-source-maps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next.js + Source Maps + Sentry

Upload source maps to Sentry during production build in your Next.js project

Installation

npm install kamilogorek/next-sentry-source-maps

or

yarn add kamilogorek/next-sentry-source-maps

Usage with environment variables

Create a next.config.js

const { withSentrySourceMaps } = require('kamilogorek/next-plugin-sentry');

module.exports = withSentrySourceMaps({
  webpack(config, options) {
    return config
  }
})

Then you can run a regular build command and source maps will be outputted and uploaded to Sentry for the bundles

npm run build

Configuring plugin

If you want to configure Sentry Webpack Plugin, you need to use non-preconfigured version of wrappers instead.

const { withSentry, withSourceMaps } = require('kamilogorek/next-plugin-sentry');

const sentry = withSentry({
  configKey: 'configValue'
})
const sourceMaps = withSourceMaps({
  devtool: 'hidden-source-map'
})

module.exports = sentry(sourceMaps({
  webpack(config, options) {
    return config
  }
}))

About

No description or website provided.

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 3

  •  
  •  
  •