# @react-app/css-modules-typings-loader

> Webpack loader to generate TS typings of local classnames as [filename].d.ts file alongside source file.

Latest version **1.2.7** (published 2019-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @react-app/css-modules-typings-loader
pnpm add @react-app/css-modules-typings-loader
yarn add @react-app/css-modules-typings-loader
bun add @react-app/css-modules-typings-loader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.7 |
| Published | 2019-01-10 |
| First published | 2019-01-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 13.7 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | Peter Pristas |
| Maintainers | pristas-peter |

## Links

- npm: https://www.npmjs.com/package/@react-app/css-modules-typings-loader
- npm.io page: https://npm.io/package/@react-app/css-modules-typings-loader

## Dependencies (2)

- [humps](https://npm.io/package/humps.md) 2.0.1
- [loader-utils](https://npm.io/package/loader-utils.md) 1.2.3

## Recent versions

- 1.2.7 (latest) — 2019-01-10
- 1.2.6 — 2019-01-10
- 1.2.5 — 2019-01-10
- 1.2.4 — 2019-01-10
- 1.2.2 — 2019-01-08
- 1.2.1 — 2019-01-07
- 1.2.0 — 2019-01-07

## README

# css-modules-typings-loader

Webpack loader to generate TS typings of local classnames as [filename].d.ts file alongside source file.

```
npm i @react-app/css-modules-typings-loader
```

<br />
To use this loader add it to chain after css-loader.

In development:

```
{
  test: /\.module\.css$/,
  use: [
    'style-loader',
    'css-modules-typings-loader',
    {
      loader: 'css-loader',
      options: {
        modules: true,
      }
    },
  ],
}
```

In production:

```
{
  test: /\.module\.css$/,
  use: [
    MiniCssExtractPlugin.loader
    'css-modules-typings-loader',
    {
      loader: 'css-loader',
      options: {
        modules: true,
      }
    },
  ],
}
```
<br>

**Configuration**

You can create .cssmodulestypings.js config file in the current working directory or pass options object via loader options. It supports following:

```
{
    suffix: (filename: string) => string // add custom suffix to generated interface name (defaults to Styles)
}
```

---
_Source: https://npm.io/package/@react-app/css-modules-typings-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
