-
Notifications
You must be signed in to change notification settings - Fork 360
Description
Describe the feature request
Hello. First of all, thank you for the great library!
Currently @stylexjs/babel-plugin uses @dual-bundle/import-meta-resolve (a fork of import-meta-resolve) to resolve module paths (code range).
However import-meta-resolve ponyfill does not support Yarn PnP environment. As a result, when using StyleX with Yarn PnP, it isn't possible to import styles from external packages.
As an alternative there is oxc-resolver, a port of webpack's enhanced-resolve. It implements the CJS/ESM resolution algorithms and supports Yarn PnP.
I'm currently maintaining a fork of the StyleX babel-plugin that uses oxc-resolver for module resolution instead of import-meta-resolve:
- https://github.com/suhdonghwi/stylex/tree/oxc-resolver
- Diff: https://github.com/facebook/stylex/compare/main...suhdonghwi:stylex:oxc-resolver?expand=1
I've verified that it works in Yarn PnP mode and that all tests pass. Would you be open to accepting this change upstream? Thank you!