Open sibelius opened 5 years ago
Try:
mainFields: [
'module',
'main'
]
If you create a small repro repo I can dig in a bit more.
here is the repo https://github.com/sibelius/babel-register-esm
I've added a readme with info of how to run
let me know if you need anything else
I think we need to do something like this
https://github.com/davewasmer/main-dir/blob/master/index.js#L123
modify the Module._findPath
for now I'm using @webpack to fix mainFields behavior
I'm trying to make a cli using
@babel/register
andesm
to make work in development easier for usthis is the cli
babel-register-esm.js
My use case is to use
module
package.json field in development andmain
field in production (compiled build)When I run this in my monorepo I've got this error:
this is the package.json of my
@entria/mypackage'
is there anything that I'm missing?