An open API service indexing awesome lists of open source software.

https://github.com/nurliman/next-optimized-classnames

Reduce all CSS classes produced by CSS modules to the smallest form possible
https://github.com/nurliman/next-optimized-classnames

Last synced: 21 days ago
JSON representation

Reduce all CSS classes produced by CSS modules to the smallest form possible

Awesome Lists containing this project

README

        

# next-optimized-classnames

> Reduce all CSS classes produced by CSS modules to the smallest form possible

**Classes are only optimized in production builds**

Works with SASS/SCSS/CSS modules

## Install

```bash
npm i @nurliman/next-optimized-classnames
```

## Use

### Standalone

```js
// next.config.js

module.exports = require('@nurliman/next-optimized-classnames')()
```

### With custom configuration

```js
// next.config.js

module.exports = require('@nurliman/next-optimized-classnames')({
// Custom config
})
```

### With other plugins

```js
// next.config.js

module.exports = require('next-compose-plugins')(
[
[require('@nurliman/next-optimized-classnames')]
// Other plugins
],
{
// Your config
}
)
```

## Example

### Without `@nurliman/next-optimized-classnames`

```html


My website


This is the BEST website ever!



```

### With `@nurliman/next-optimized-classnames`

```html


My website


This is the BEST website ever!



```