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
@@ -130,15 +130,16 @@ export type SentryNuxtModuleOptions = {
130
130
131
131
/**
132
132
* By default—unless you configure `dynamicImportForServerEntry: false`—the SDK will try to wrap your application entrypoint
133
-
* with a dynamic `import()` to ensure all dependencies can be properly instrumented.
133
+
* with a dynamic `import()` to ensure all dependencies can be properly instrumented. Any previous exports from the entrypoint are still exported.
134
+
* Most exports of the server entrypoint are serverless functions and those are wrapped by Sentry. Other exports stay as-is.
134
135
*
135
136
* By default, the SDK will wrap the default export as well as a `handler` or `server` export from the entrypoint.
136
137
* 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.
137
138
* Any wrapped export is expected to be an async function.
138
139
*
139
140
* @default ['default', 'handler', 'server']
140
141
*/
141
-
asyncFunctionReExports?: string[];
142
+
entrypointWrappedFunctions?: string[];
142
143
143
144
/**
144
145
* 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