I added graphql and graphql-request to my extension and wanted to use them to interface with an external graphql API.
Unfortunately when using the request and gql functions from graphql-request the extension stopped compiling and I started getting this error:
[RollupError] Unexpected token (Note that you need plugins to import files that are not JavaScript)
/home/banze/projects/data-cms/node_modules/.pnpm/[email protected]/node_modules/graphql/jsutils/instanceOf.mjs:12:35
10: /* c8 ignore next 6 */
11: // FIXME: https://github.com/graphql/graphql-js/issues/2317
12: globalThis.process && globalThis.process.env.NODE_ENV === 'production'
^
13: ? function instanceOf(value, constructor) {
14: return value instanceof constructor;
RollupError: Unexpected token (Note that you need plugins to import files that are not JavaScript)
at error (file:///home/banze/projects/data-cms/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:2125:30)
at Module.error (file:///home/banze/projects/data-cms/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:13452:16)
at Module.tryParse (file:///home/banze/projects/data-cms/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:14173:25)
at Module.setSource (file:///home/banze/projects/data-cms/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:13775:39)
at ModuleLoader.addModuleSource (file:///home/banze/projects/data-cms/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:23771:20)