Wednesday, 19 October 2022

cypress 10, error on loading typescript file 'You may need an additional loader to handle the result of these loaders'

I just installed cypress 10, e2e test are working normally although I import typescript files, but for component test, I have this error about typescript syntax not being recognized, for example:

    Module parse failed: Unexpected token (6:7)
File was processed with these loaders:
* ../../node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
> export type { Something as SomethingElse } from './something';

Does not recognize the export type on that file.

I followed the UI guide on the cypress GUI, what I find wierd is that e2e test work normally even though I load typescript files but for component test I have this kind of errors



from cypress 10, error on loading typescript file 'You may need an additional loader to handle the result of these loaders'

No comments:

Post a Comment