We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When you want to use dynamic import syntax, you must import babel-plugin-syntax-dynamic-import, but jest still give the unexpected token import error.
babel-plugin-syntax-dynamic-import
unexpected token import
Add babel-plugin-dynamic-import-node in test environment will resolve this problem.
babel-plugin-dynamic-import-node
.babelrc
{ "env": { "test": { "plugins": [ "dynamic-import-node", "syntax-dynamic-import" ] } } }
Ref: jestjs/jest#2442 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When you want to use dynamic import syntax, you must import
babel-plugin-syntax-dynamic-import
, but jest still give theunexpected token import
error.Add
babel-plugin-dynamic-import-node
in test environment will resolve this problem..babelrc
The text was updated successfully, but these errors were encountered: