DiederikvandenB / apollo-link-sentry

Apollo Link middleware which enriches SentryJS with GraphQL data
MIT License
123 stars 36 forks source link

Allow using package without supporting esnext #462

Open UgurGumushan opened 10 months ago

UgurGumushan commented 10 months ago

I couldn't use the most recent version of this package without supporting esnext on my project. Can you build this package by targeting an ES/JS version which is widely supported?

`ERROR in ./node_modules/apollo-link-sentry/lib-esm/excludeGraphQLFetch.js 3:36 Module parse failed: Unexpected token (3:36) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | export const excludeGraphQLFetch = (breadcrumb) => { | if (breadcrumb.category === 'fetch') {

    const url = breadcrumb.data?.url ?? '';

| if (url.includes('/graphql')) { | return null;

ERROR in ./node_modules/apollo-link-sentry/lib-esm/SentryLink.js 7:11 Module parse failed: Unexpected token (7:11) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | import { attachBreadcrumbToSentry, setFingerprint, setTransaction, } from './sentry'; | export class SentryLink extends ApolloLink {

options;

| constructor(options = {}) { | super();`

spawnia commented 2 months ago

Feel free to contribute a pull request that changes this. I have no issue with it myself, so I am not looking to do anything about it.