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
+11
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,17 @@ export type SentryNuxtModuleOptions = {
117
117
*/
118
118
dynamicImportForServerEntry?: boolean;
119
119
120
+
/**
121
+
* The `asyncFunctionReExports` option is only relevant when `dynamicImportForServerEntry: true` (default value).
122
+
*
123
+
* As the server entry file is wrapped with a dynamic `import()`, previous async function exports need to be re-exported.
124
+
* The SDK detects and re-exports those exports (mostly serverless functions). This is why they are re-exported as async functions.
125
+
* In case you have a custom setup and your server exports other async functions, you can override the default array with this option.
126
+
*
127
+
* @default ['default', 'handler', 'server']
128
+
*/
129
+
asyncFunctionReExports?: string[];
130
+
120
131
/**
121
132
* 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
133
* You can use this option to override any options the SDK passes to the Vite (for Nuxt) and Rollup (for Nitro) plugin.
"[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`.",
155
+
),
156
+
);
157
+
}
135
158
136
159
// 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)
@@ -161,7 +184,7 @@ function wrapEntryWithDynamicImport(resolvedSentryConfigPath: string): InputPlug
161
184
`import(${JSON.stringify(entryId)});\n`+
162
185
// 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()`.
0 commit comments