gajus / gajus/babel-plugin-react-css-modules

Make babel-plugin-react-css-modules work with commonjs require

Aperta
#38 6 commenti 10 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
JavaScript
Stelle
2k
Fork
159
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hello,

when requiring scss files using `require()` syntax I get `Cannot use styleName attribute without importing at least one stylesheet.`. However if I switch to using import it works (minus an eslint parsing error).

I'm trying to introduce css-modules into an old code base. I have the es6 babel preset running (that's why imports work), but code is linted without modules support and I would love to keep it that way for the time being. Is there anyway to make this plugin work with require?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.