microsoft / griffel

CSS-in-JS with ahead-of-time compilation ⚡️
https://griffel.js.org
MIT License
1.2k stars 61 forks source link

babel-preset: transforms dont work with `swc` commonjs output #514

Closed Hotell closed 7 months ago

Hotell commented 8 months ago

cross posting for better visibility

All the context: https://github.com/microsoft/fluentui/issues/26251

layershifter commented 7 months ago

@Hotell indeed, Linaria v3 does not have the best handling of SWC output (which changes from version to version 🙄 ) and will not as it's EOL. wyw-in-js has better coverage there, https://github.com/Anber/wyw-in-js/pull/19. Anyway, compiling CJS code is not something that we are looking forward.

With a switch to wyw-in-js it should work in the scenario linked, https://github.com/microsoft/griffel/issues/513#issuecomment-2042819789.