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

Example with typescript?

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

Descrizione

1)Following the tutorial and modyfing .babelrc did not change 'stylename' to 'classname'.
webpack.js:
`const context = path.resolve(__dirname, '..');`
.babelrc
```
["react-css-modules", {
"webpackHotModuleReloading": true,
"context": ".."
}],
```
2)I tried config from demo example :

```
{
test: /\.tsx?$/,
loader: 'ts-loader',
query: {
plugins: [
'@babel/transform-react-jsx',
[
'react-css-modules',
{
context
}
]
]
}
}
```

but it won't work with ts-loader
`Error: ts-loader was supplied with an unexpected loader option: plugins`

Can you please provide example how to use it with ts?

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.