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
When running vitest with graphql-editor, receives below error.
SyntaxError: Unexpected token 'export'
❯ Object.<anonymous> node_modules/graphql-editor/lib/state/containers/trees/index.js:16:33
Module <project_path>/node_modules/graphql-editor-worker/lib/index.js:1 seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package "graphql-editor-worker" asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
As a temporary workaround you can try to inline the package by updating your config:
// vitest.config.js
export default {
test: {
server: {
deps: {
inline: [
"graphql-editor-worker"
]
}
}
}
}
Thanks.
The text was updated successfully, but these errors were encountered:
When running
vitest
withgraphql-editor
, receives below error.Thanks.
The text was updated successfully, but these errors were encountered: