facebook / facebook/stylex

Add support for Babel 8

Open
#1,790 0 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

Summary
Add official support for Babel 8 across the StyleX Babel-based packages (@stylexjs/babel-plugin and any packages depending on @babel/core).

Motivation
Babel 8 introduces breaking changes relative to Babel 7 (dropped support for older Node.js versions, ESM-first distribution, removal of deprecated options/APIs, stricter defaults, etc.). Tooling built on top of @babel/core needs to declare compatibility so downstream users can upgrade without peer-dependency conflicts. StyleX currently pins to @babel/core@^7, which blocks projects migrating to Babel 8.

Proposed solution
Widen the @babel/core peer/dev dependency range to allow ^8 (e.g. ^7.x || ^8.x) in @stylexjs/babel-plugin and related packages.
Audit usage of any Babel APIs that changed or were removed in Babel 8 (visitor/types helpers, config options, plugin ordering) and update accordingly.
Update @babel/* dev dependencies and the test/CI matrix to run against both Babel 7 and Babel 8.
Update documentation to note supported Babel versions.
Additional context
This also unblocks third-party integrations that mirror StyleX's Babel plugin, which depend on StyleX's declared Babel compatibility.

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.