babel-plugin-react-css-modules icon indicating copy to clipboard operation
babel-plugin-react-css-modules copied to clipboard

Getting working with Preact

Open evenfrost opened this issue 6 years ago • 3 comments

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 avatar Apr 08 '19 16:04 evenfrost

@evenfrost Are you available to debug this/ raise a PR if there is an issue?

gajus avatar Apr 08 '19 16:04 gajus

Sorry, have no experience with Babel plugins development, but I can build up a reproduction repo if needed.

evenfrost avatar Apr 08 '19 16:04 evenfrost

Also related: https://github.com/developit/preact/issues/498.

evenfrost avatar Apr 08 '19 17:04 evenfrost