https://github.com/jiaronggu/css-type-loader
type loader for css-module and typescript
https://github.com/jiaronggu/css-type-loader
css-modules loader typescript webpack
Last synced: 6 months ago
JSON representation
type loader for css-module and typescript
- Host: GitHub
- URL: https://github.com/jiaronggu/css-type-loader
- Owner: JiarongGu
- License: mit
- Created: 2019-03-07T13:21:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-01T02:36:54.000Z (over 6 years ago)
- Last Synced: 2025-06-26T11:11:28.617Z (7 months ago)
- Topics: css-modules, loader, typescript, webpack
- Language: TypeScript
- Homepage:
- Size: 25.4 KB
- Stars: 7
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# css-type-loader
[](https://www.npmjs.com/package/css-type-loader)
css type loader for genrate .d.ts file for css module.
## Installation
```npm install css-type-loader```
## How to use
Add css-type-loader directly after css-loader in your webpack config.
```javascript
module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: [
'css-type-loader',
{
loader: 'css-loader',
options: {
modules: true,
camelCase: true // this is required for convert dashs to camelCase
}
}
]
}
]
}
};
```
## Propose of this repo
1. To generate types thats vaild syntax in Typescirpt
2. To sync with the newest css-loader
## Thanks for
- [typings-for-css-modules-loader](https://github.com/Jimdo/typings-for-css-modules-loader)
- [css-modules-typescript-loader](https://github.com/seek-oss/css-modules-typescript-loader)