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

Example with typescript?

Open
#274 3 comments 2 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
2k
Forks
159
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.