https://github.com/baroshem/compression
🗜 Compression module for Nuxt 3
https://github.com/baroshem/compression
compression module nuxt performance
Last synced: 4 months ago
JSON representation
🗜 Compression module for Nuxt 3
- Host: GitHub
- URL: https://github.com/baroshem/compression
- Owner: Baroshem
- License: mit
- Created: 2022-01-23T12:17:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-23T17:48:34.000Z (over 3 years ago)
- Last Synced: 2025-01-31T05:51:17.810Z (4 months ago)
- Topics: compression, module, nuxt, performance
- Language: TypeScript
- Homepage: https://compression-nm.netlify.app/
- Size: 13.1 MB
- Stars: 32
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://compression-nm.netlify.app)
# @nuxt-modules/compression
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Github Actions CI][github-actions-ci-src]][github-actions-ci-href]
[![Codecov][codecov-src]][codecov-href]
[![License][license-src]][license-href]> Assets Compression module for [Nuxt 3](https://v3.nuxtjs.org)
- [✨  Release Notes](https://github.com/nuxt-modules/compression/releases)
- [📖  Read the documentation](https://compression-nm.netlify.app)## Features
- Nuxt 3 ready
- Assets Compression using [vite-plugin-compression](https://github.com/vbenjs/vite-plugin-compression)
- Advanced configuration options
- TypeScript support[📖  Read the documentation](https://compression-nm.netlify.app)
## Setup
```sh
yarn add @nuxt-modules/compression # yarn
npm i @nuxt-modules/compression # npm
```## Basic usage
Firstly, you need to add `@nuxt-modules/compression` to your Nuxt config.
```javascript
// nuxt.config.js{
buildModules: [
['@nuxt-modules/compression', {
algorithm: 'brotliCompress'
}]
]
}
```And that's it! Now, the brotli compression will compress your assets. For more configuration options (like brotli compression, filter assets, etc) please, visit the official docs.
## Development
1. Clone this repository
2. Install dependencies using `yarn install` or `npm install`
3. Start development server using `yarn dev` or `npm run dev`## License
[MIT License](./LICENSE)
[npm-version-src]: https://img.shields.io/npm/v/@nuxt-modules/compression/latest.svg
[npm-version-href]: https://npmjs.com/package/@nuxt-modules/compression[npm-downloads-src]: https://img.shields.io/npm/dt/@nuxt-modules/compression.svg
[npm-downloads-href]: https://npmjs.com/package/@nuxt-modules/compression[github-actions-ci-src]: https://github.com/nuxt-modules/compression/workflows/ci/badge.svg
[github-actions-ci-href]: https://github.com/nuxt-modules/compression/actions?query=workflow%3Aci[codecov-src]: https://img.shields.io/codecov/c/github/nuxt-modules/compression.svg
[codecov-href]: https://codecov.io/gh/nuxt-modules/compression[license-src]: https://img.shields.io/npm/l/@nuxt-modules/compression.svg
[license-href]: https://npmjs.com/package/@nuxt-modules/compression