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
- Host: GitHub
- URL: https://github.com/nurliman/next-optimized-classnames
- Owner: nurliman
- Created: 2022-03-05T02:20:15.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-20T19:54:42.000Z (over 1 year ago)
- Last Synced: 2024-04-23T11:17:58.333Z (about 1 year ago)
- Language: TypeScript
- Size: 73.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 11
-
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 @nurliman/next-optimized-classnames
```## Use
### Standalone
```js
// next.config.jsmodule.exports = require('@nurliman/next-optimized-classnames')()
```### With custom configuration
```js
// next.config.jsmodule.exports = require('@nurliman/next-optimized-classnames')({
// Custom config
})
```### With other plugins
```js
// next.config.jsmodule.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!
```