Closed qiweiii closed 11 months ago
Only core needs to be dual and this is not dual
Only core needs to be dual and this is not dual
@ermalkaleci could you explain a bit
my understanding of dual is when you have .cjs
and .mjs
file extension and node will import .cjs
and if you enable esm it will choose .mjs
file extension
another thing. Do not change current path. I'm sure it will break somewhere. Just add esm into /lib/esm
. The tests are all running ok because our ts setup doesn't require any pre-build to work
my understanding of dual is when you have
.cjs
and.mjs
file extension and node will import.cjs
and if you enable esm it will choose.mjs
file extension
Yes, this is another way to do this
I don't think we need this anyway. Bundlers will just transform the code and bun for example works with both.
another thing. Do not change current path. I'm sure it will break somewhere. Just add esm into
/lib/esm
. The tests are all running ok because our ts setup doesn't require any pre-build to work
assuming everything are wired correctly (the export map), everything should work
keep the current tsconfig and create new one only for esm so vscode won't give warnings
keep the current tsconfig and create new one only for esm so vscode won't give warnings
what warnings does it give?
tools will look for tsconfig.json which doesn't have any reference. we don't need to have 3 tsconfig. Just default one for cjs and another one for esm
close #487
build for both cjs and esm.