esm.sh icon indicating copy to clipboard operation
esm.sh copied to clipboard

resolve submodule with 'exports' filed failed

Open alienzhou opened this issue 3 years ago • 3 comments

Currently esm.sh seems not completely exact to resolve the module with the 'exports' filed.

For example, importing es/utils/rand.mjs from [email protected] will return a wrong resolved (besides it has another bug now). And there are some other abnormal cases.

Would esm.sh consider following the nodejs resolution spec and algorithm?

alienzhou avatar Jun 29 '22 12:06 alienzhou

The exports is totally chaos, i tried to respect the spec but there are a lot of edge cases

ije avatar Jun 29 '22 13:06 ije

Agree. It's a chaos. I'm using esm.sh in some projects and find some errors with several packages. When skipping the exports all things go well.

Is it necessary to provide an option which could ignore the exports?

alienzhou avatar Jun 30 '22 11:06 alienzhou

i'm not sure, there are too many options now... i will look into the element-plus package

ije avatar Jun 30 '22 22:06 ije