Anber / wyw-in-js

MIT License
191 stars 8 forks source link

fix(shared): crash while resolving esm-only package #49

Closed Anber closed 4 months ago

Anber commented 4 months ago

Motivation

See #43

Summary

require can't resolve ESM-only packages. We can use the resolve package here, but it does not solve all cases because pkgName can be an alias and should be resolved by a bundler. However, we can't use resolve from a bundler because it is async. The good news is that in that specific case, we can just ignore those packages. For now.

changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: 2b389ca0a2ea44851a8f1405a41e9fb6361d8889

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR