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
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -129,11 +129,12 @@ export type SentryNuxtModuleOptions = {
129
129
dynamicImportForServerEntry?: boolean;
130
130
131
131
/**
132
-
* The `asyncFunctionReExports` option is only relevant when `dynamicImportForServerEntry: true` (default value).
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
134
*
134
-
* As the server entry file is wrapped with a dynamic `import()`, previous async function exports need to be re-exported.
135
-
* The SDK detects and re-exports those exports (mostly serverless functions). This is why they are re-exported as async functions.
136
-
* In case you have a custom setup and your server exports other async functions, you can override the default array with this option.
135
+
* By default, the SDK will wrap the default export as well as a `handler` or `server` export from the entrypoint.
136
+
* 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
+
* Any wrapped export is expected to be an async function.
"[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`.",
156
-
),
157
-
);
158
-
}
159
-
160
145
// 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 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`.",
"[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`.",
132
+
);
133
+
134
+
consoleWarnSpy.mockRestore();
135
+
});
136
+
});
137
+
105
138
describe('constructFunctionReExport',()=>{
106
139
it('constructs re-export code for given query parameters and entry ID',()=>{
0 commit comments