Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/nuxt/src/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ type SourceMapsOptions = {
* Build options for the Sentry module. These options are used during build-time by the Sentry SDK.
*/
export type SentryNuxtModuleOptions = {
/**
* Enable the Sentry Nuxt Module.
*
* @default true
*/
enabled?: boolean;

/**
* Options for the Sentry Vite plugin to customize the source maps upload process.
*
Expand Down
4 changes: 4 additions & 0 deletions packages/nuxt/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export default defineNuxtModule<ModuleOptions>({
},
defaults: {},
setup(moduleOptionsParam, nuxt) {
if (moduleOptionsParam?.enabled === false) {
return;
}

const moduleOptions = {
...moduleOptionsParam,
autoInjectServerSentry: moduleOptionsParam.autoInjectServerSentry,
Expand Down
Loading