facebook / facebook/stylex

[babel-plugin] Support ESM module resolution

Open
#1,051 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
10.3k
Forks
481
Avg merge
3d 8h
Merged PRs (30d)
13

Description

### Describe the feature request

The web is moving away from CommonJS, and StyleX is currently the only reason I still need to distribute my libraries in CommonJS.

Tooling gets significantly simpler once I can drop CommonJS support, so I’m hoping you can support ESM soon—if it doesn’t introduce too much complexity on your side.

```js
[
"@stylexjs/babel-plugin",
{
unstable_moduleResolution: {
type: "ESM"
}
}
]
```

Looking forward, thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.