Open markandan opened 6 years ago
Thanks for reporting.
Does esModules: true
work with require statements, too? I'm just asking cause babel may be configured with transpiling modules to commonjs.
Can you create a PR to update the docs?
Pull request created. It works with require statement as well.
Thanks for posting this! I hope this crucial piece of information makes it into the main docs one day.
Hi,
While following the steps given in the documentation. I came across the following error
"Syntax error: 'import' and 'export' may appear only with 'sourceType: "module"'"
I searched and found that we need to add one configuration (highlighted in bold below)
{ test: /.(js|ts)/, include: path.resolve('src'), // instrument only testing sources with Istanbul, after ts-loader runs loader: 'istanbul-instrumenter-loader', query: { esModules: true } }