stylex
stylex copied to clipboard
Babel plugin is not compatible with @babel/preset-env
Describe the issue
When using rollup plugin, stylex.css stops being output when @babel/preset-env is added to a babel config in root directory
Expected behavior
If the plugin is supposed to be compatible with @babel/preset-env, I would expect the stylex.css to still be output after adding @babel/preset-env
Steps to reproduce
- Use rollup-example as a starting point (I copied this folder out of npm workspace).
- Add the latest versions of rollup, @babel/cli, @babel/core, @babel/preset-env to package.json dependencies
- npm install using npm 18.15.0
- npm run build (works at this point and stylex.css is output)
- add a babel-config.js (or json) that includes @babel/preset-env in the presets array
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "18"
}
}
]
]
}
And then styles stop working. Seems any other plugins or presets works but the minute I add preset-env no styles are generated
Test case
No response
Additional comments
No response