csstypes-loader
TypeScript icon, indicating that this package has built-in type declarations

0.3.2 • Public • Published

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
}

Package Sidebar

Install

npm i csstypes-loader

Weekly Downloads

1

Version

0.3.2

License

MIT

Unpacked Size

3.72 kB

Total Files

5

Last publish

Collaborators

  • ong