csstypes-loader
v0.3.2
Published
Generate typescript declaration files based on css.
Downloads
1
Readme
csstypes-loader
Generate typescript declaration files based on css class selector
Installation
npm install --save-dev csstypes-loader
Usage
{
...
module: {
rules: [
{
test: /\.(css|less|scss)$/,
use: [
'style-loader',
'csstypes-loader',
'css-loader',
...
]
}
]
}
...
}
NOTE : If a declaration file for style file does not exist, webpack may not compile successfully, you can add following code to your global.d.ts
file.
declare module '*.css[*.less/*.scss]' {
const style: any
export default sylte
}