Skip to content

plugin.client serializeFunction make transport not work #343

@Jogiter

Description

@Jogiter

Version

@nuxtjs/sentry: latest
nuxt: latest

Sentry configuration

default using fetch. and somehow my project can not use fetch. so i replace it with xhr

module.exports = {
  modules: ["@nuxtjs/sentry"],
  
  sentry: {
    dsn: "DSN", // Enter your project's DSN here
    // Additional Module Options go here
    // https://sentry.nuxtjs.org/sentry/options
    config: {
      // Add native Sentry config here
      // https://docs.sentry.io/platforms/javascript/guides/vue/configuration/options/
      transport: Sentry.Transports.XHRTransport
    }
  }
}

Reproduction Link

Reproduction Link

Steps to reproduce

wait for 2 seconds, console will log en error

What is Expected?

no error and sentry works

What is actually happening?

image

it seems that plugin.client.js#L24 which use serializeFunction from @nuxt/utils make the transport function give this error.

import { BaseBackend } from '@sentry/core';

var BrowserBackend = /** @class */ (function (_super) {
  __extends(BrowserBackend, _super);
  function BrowserBackend() {
    return (_super !== null && _super.apply(this, arguments)) || this;
  }
  return BrowserBackend;
})(BaseBackend);

the BrowserBackend function is the function passing into serializeFunction(), turns into a function below:

transport: function transport() {
   return _super !== null && _super.apply(this, arguments) || this;
}

here is the error: _super is not defined

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions