You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/nuxt/src/common/types.ts
+13
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,19 @@ export type SentryNuxtModuleOptions = {
117
117
*/
118
118
dynamicImportForServerEntry?: boolean;
119
119
120
+
/**
121
+
* By default—unless you configure `dynamicImportForServerEntry: false`—the SDK will try to wrap your Nitro server entrypoint
122
+
* with a dynamic `import()` to ensure all dependencies can be properly instrumented. Any previous exports from the entrypoint are still exported.
123
+
* Most exports of the server entrypoint are serverless functions and those are wrapped by Sentry. Other exports stay as-is.
124
+
*
125
+
* By default, the SDK will wrap the default export as well as a `handler` or `server` export from the entrypoint.
126
+
* If your server has a different main export that is used to run the server, you can overwrite this by providing an array of export names to wrap.
127
+
* Any wrapped export is expected to be an async function.
128
+
*
129
+
* @default ['default', 'handler', 'server']
130
+
*/
131
+
entrypointWrappedFunctions?: string[];
132
+
120
133
/**
121
134
* Options to be passed directly to the Sentry Rollup Plugin (`@sentry/rollup-plugin`) and Sentry Vite Plugin (`@sentry/vite-plugin`) that ship with the Sentry Nuxt SDK.
122
135
* You can use this option to override any options the SDK passes to the Vite (for Nuxt) and Rollup (for Nitro) plugin.
// The enclosing `if` already checks for the suffix in `source`, but a check in `resolution.id` is needed as well to prevent multiple attachment of the suffix
// Concatenates the query params to mark the file (also attaches names of re-exports - this is needed for serverless functions to re-export the handler)
"[Sentry] No functions found to wrap. In case the server needs to export async functions other than `handler` or `server`, consider adding the name(s) to Sentry's build options `sentry.entrypointWrappedFunctions` in `nuxt.config.ts`.",
0 commit comments