4.0.4 • Published 4 years ago

@bitsler/nuxt-sentry-spa v4.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

@bitsler/nuxt-sentry-spa

npm (scoped with tag) npm js-standard-style

Sentry module for Nuxt.js SPA build

Features

The module enables error logging through Sentry.

  • This is an abstraction of sentry.client.js from https://github.com/nuxt-community/sentry-module for use with SPA build ONLY!

Setup

  • Add @bitsler/nuxt-sentry-spa dependency using yarn or npm to your project
  • Add @bitsler/nuxt-sentry-spa to modules section of nuxt.config.js
{
  modules: [
    '@bitsler/nuxt-sentry-spa',
  ],

  sentry: {
    dsn: '', // Enter your project's DSN here
    config: {}, // Additional config
  }
}

Nuxt compatibility

Versions of NuxtJS before v2.4.0 are not supported by this package.

Usage

Enter your DSN in the NuxtJS config file. Additional config settings can be found here.

Options

Options can be passed using either environment variables or sentry section in nuxt.config.js. Normally setting required DSN information would be enough.

dsn

  • Type: String
    • Default: process.env.SENTRY_DSN || false
    • If no dsn is provided, Sentry will be initialised, but errors will not be logged. See #47 for more information about this.

disabled

  • Type: Boolean
    • Default: process.env.SENTRY_DISABLED || false
    • Sentry will not be initialised if set to true.

disableClientSide

  • Type: Boolean
    • Default: process.env.SENTRY_DISABLE_CLIENT_SIDE || false

initialize

  • Type: Boolean
    • Default: process.env.SENTRY_INITIALIZE || true

publishRelease

disableClientRelease

clientIntegrations

config

  • Type: Object
    • Default: { environment: this.options.dev ? 'development' : 'production' }

clientConfig

  • Type: Object
    • Default: { }
    • If specified, values will override config values for client sentry plugin

Submitting releases to Sentry

  • You can pass the options for @sentry/webpack-plugin as a environment variable Example:
SENTRY_ORG=yourorig
SENTRY_PROJECT=projectname
SENTRY_DSN=https://yourdsn@sentry.io/2

Note that releases are only submitted to Sentry when (options.publishRelease && !isDev) is true.

License

MIT License

4.0.4

4 years ago

4.0.1

4 years ago

4.0.3

4 years ago

4.0.2

4 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago