I have a JavaScript project where the frontend uses ES Modules (built with babel / webpack) and the backend uses CommonJS modules. All files use the .js
extension. Given this mix and the file extension convention, I can't set "type": "module"
in my project's package.json
.
I'm using AVA to run unit tests across the frontend and backend. Is there a way to run the frontend tests as ES Modules and the backend tests as CommonJS modules?