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
+3-2
Original file line number
Diff line number
Diff line change
@@ -119,15 +119,16 @@ export type SentryNuxtModuleOptions = {
119
119
120
120
/**
121
121
* By default—unless you configure `dynamicImportForServerEntry: false`—the SDK will try to wrap your application entrypoint
122
-
* with a dynamic `import()` to ensure all dependencies can be properly instrumented.
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.
123
124
*
124
125
* By default, the SDK will wrap the default export as well as a `handler` or `server` export from the entrypoint.
125
126
* If your application has a different main export that is used to run the application, you can overwrite this by providing an array of export names to wrap.
126
127
* Any wrapped export is expected to be an async function.
127
128
*
128
129
* @default ['default', 'handler', 'server']
129
130
*/
130
-
asyncFunctionReExports?: string[];
131
+
entrypointWrappedFunctions?: string[];
131
132
132
133
/**
133
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.
@@ -148,7 +149,9 @@ function wrapEntryWithDynamicImport({
148
149
: resolution.id
149
150
// 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)
@@ -170,7 +174,7 @@ function wrapEntryWithDynamicImport({
170
174
`import(${JSON.stringify(entryId)});\n`+
171
175
// By importing "import-in-the-middle/hook.mjs", we can make sure this file wil be included, as not all node builders are including files imported with `module.register()`.
"[Sentry] No functions found for re-export. In case your server needs to export async functions other than `handler` or `server`, consider adding the name(s) to Sentry's build options `sentry.asyncFunctionReExports` in your `nuxt.config.ts`.",
111
+
"[Sentry] No functions found to wrap. In case your server needs to export async functions other than `handler` or `server`, consider adding the name(s) to Sentry's build options `sentry.entrypointWrappedFunctions` in your `nuxt.config.ts`.",
0 commit comments