Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kenmueller/next-optimized-classnames
Reduce all CSS classes produced by CSS modules to the smallest form possible
https://github.com/kenmueller/next-optimized-classnames
Last synced: about 2 months ago
JSON representation
Reduce all CSS classes produced by CSS modules to the smallest form possible
- Host: GitHub
- URL: https://github.com/kenmueller/next-optimized-classnames
- Owner: kenmueller
- Created: 2021-01-28T00:17:31.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-13T19:09:35.000Z (over 2 years ago)
- Last Synced: 2024-10-11T00:07:23.029Z (3 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 37
- Watchers: 3
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
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 next-optimized-classnames
```## Use
### Standalone
```js
// next.config.jsmodule.exports = require('next-optimized-classnames')()
```### With custom configuration
```js
// next.config.jsmodule.exports = require('next-optimized-classnames')({
// Custom config
})
```### With other plugins
```js
// next.config.jsmodule.exports = require('next-compose-plugins')(
[
[require('next-optimized-classnames')]
// Other plugins
],
{
// Your config
}
)
```## Example
### Without `next-optimized-classnames`
```html
My website
This is the BEST website ever!
```### With `next-optimized-classnames`
```html
My website
This is the BEST website ever!
```