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-4
Original file line number
Diff line number
Diff line change
@@ -118,11 +118,12 @@ export type SentryNuxtModuleOptions = {
118
118
dynamicImportForServerEntry?: boolean;
119
119
120
120
/**
121
-
* The `asyncFunctionReExports` option is only relevant when `dynamicImportForServerEntry: true` (default value).
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
123
*
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.
124
+
* By default, the SDK will wrap the default export as well as a `handler` or `server` export from the entrypoint.
125
+
* 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
+
* 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`.",
155
-
),
156
-
);
157
-
}
158
-
159
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