When I follow the instructions found here
and add the import reference as they specify:
import "@ui5/webcomponents/dist/Button";
the application works fine and is able to import the button.
However, when I npm run test
, I get an error:
SyntaxError: Cannot use import statement outside a module.
Any idea how to fix this?
An answer was provided here.
{
"jest": {
"transformIgnorePatterns": [
"node_modules/(?!(@ui5|lit-html)).*\\.js$"
]
}
}