-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Unexpected token import - ESM in dist files #43
Comments
Why do you need it in Unit tests? |
My |
Then you should mock those. https://jestjs.io/docs/en/manual-mocks |
Thanks for the prompt answer. I assume you mean this is intended then 👍 For now, I think I prefer adding Thanks. |
Hi! Some distribution files contain ES modules: https://unpkg.com/vue-cli-plugin-apollo@0.15.0/graphql-client/dist/index.js
Is this intended? It breaks Jest since it doesn't transpile
node_modules
by default.As a workaround, renaming
.babelrc
to.babel.config.js
and usingtransformIgnorePatterns
in Jest's config make it work again. More details here.Thanks!
The text was updated successfully, but these errors were encountered: