-
Notifications
You must be signed in to change notification settings - Fork 125
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempting to use Datadog RUM with Nuxt in plugin, but fetch is already aliased before RUM can overwrite it. #339
Comments
I also experience this issue. |
I've found a workaround for my use case: a small Nuxt app generated to a static SPA with no server-side component.
nuxt.config.tsexport default defineNuxtConfig({
ssr: false,
nitro: {
static: true,
prerender: {
autoSubfolderIndex: false,
routes: ['/index.html', '/success.html'],
},
},
})
|
That said, I don't think this is actually an issue with |
The workaround above did break the functionality of the For some reason in my runtime, only Whatever the cause, adding this line to a file included in our Vitest
|
Environment
Reproduction
Not sure if I can set up an example as this might be a paid product only.
Describe the bug
I have the integration set up as a Nuxt plugin, and datadog attempts to override window.fetch, but at that point, fetch has already been stored as the original function in ofetch, so none of the callbacks get intercepted with appropriate headers. I don't see a manual way to override fetch after the fact. Is there a way to override this fetch in Nuxt?
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: