babel-plugin-react-css-modules
babel-plugin-react-css-modules copied to clipboard
Getting working with Preact
Seems styleName not being transformed to corresponding className when using preact. Tried to migrate same babel-plugin-react-css-modules config from existing React project but failed to get it working with Preact. Using preact-compat package.
Other issues (https://github.com/gajus/babel-plugin-react-css-modules/issues/200, https://github.com/gajus/babel-plugin-react-css-modules/issues/65) show notions of using Preact in their projects but no real evidence.
And slightly off-topic, but in case anyone stumbles upon styleName typings error when working with Preact, TypeScript and this plugin: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/12040#issuecomment-480890380.
@evenfrost Are you available to debug this/ raise a PR if there is an issue?
Sorry, have no experience with Babel plugins development, but I can build up a reproduction repo if needed.
Also related: https://github.com/developit/preact/issues/498.