You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using node 18 LTS and trying to get ESM working.
@novemberborn as per #5.
I don't think @ava/typescript identifies *.mts test files as ES modules properly, after compiling with babel-preset-typescript instead of tsc and "type": "module".
I'm importing shared esm babel and ava configs from separate packages - i.e. monorepo with separate config-testing workspace for ava and config-babel, for babel instrumentation respectively (yarn berry workspaces tbe).
Using experimental @babel/register/experimental-worker.js to be able to load .babel.mjs config.
I'm not sure if worker is able to identify that it's a module over here. I'm passing the js extension but I don't think I'm able to force using ES modules, by default, and fallback to CommonJS if the import had failed.
Maybe it's worth adding 'ts' 'mts' extensions explicitly over here ?
For some reason it doesn't pick .mts text files as ES Modules.
I'd like to keep babel instrumentation due to certain TSC compatibility issues with the existing coverage report tools, including Node internal coverage reporter.
The text was updated successfully, but these errors were encountered:
I'm using node 18 LTS and trying to get ESM working.
@novemberborn as per #5.
I don't think
@ava/typescript
identifies*.mts
test files as ES modules properly, after compiling withbabel-preset-typescript
instead oftsc
and"type": "module"
.I'm importing shared esm babel and ava configs from separate packages - i.e. monorepo with separate
config-testing
workspace for ava andconfig-babel
, for babel instrumentation respectively (yarn berry workspaces tbe).Using experimental
@babel/register/experimental-worker.js
to be able to load.babel.mjs
config.Everything is
"type": "module"
in here..ava.config.mjs
.babelrc.mjs
I'm not sure if worker is able to identify that it's a module over here. I'm passing the
js
extension but I don't think I'm able to force using ES modules, by default, and fallback to CommonJS if the import had failed.Maybe it's worth adding 'ts' 'mts' extensions explicitly over here ?
For some reason it doesn't pick
.mts
text files as ES Modules.I'd like to keep babel instrumentation due to certain TSC compatibility issues with the existing coverage report tools, including Node internal coverage reporter.
The text was updated successfully, but these errors were encountered: