{"id":15912462,"url":"https://github.com/robcresswell/nuxt-compress","last_synced_at":"2025-10-09T15:39:44.288Z","repository":{"id":46679289,"uuid":"171153002","full_name":"robcresswell/nuxt-compress","owner":"robcresswell","description":"A simple static asset compression module for Nuxt that runs Gzip and Brotli compression during the build process","archived":false,"fork":false,"pushed_at":"2021-09-21T14:36:05.000Z","size":110,"stargazers_count":103,"open_issues_count":4,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T12:52:51.501Z","etag":null,"topics":["brotli","gzip","nuxt","nuxt-module","nuxtjs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/nuxt-compress","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robcresswell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-17T17:51:39.000Z","updated_at":"2024-11-01T02:38:23.000Z","dependencies_parsed_at":"2022-08-15T17:40:11.947Z","dependency_job_id":null,"html_url":"https://github.com/robcresswell/nuxt-compress","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robcresswell%2Fnuxt-compress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robcresswell%2Fnuxt-compress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robcresswell%2Fnuxt-compress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robcresswell%2Fnuxt-compress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robcresswell","download_url":"https://codeload.github.com/robcresswell/nuxt-compress/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248086080,"owners_count":21045271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brotli","gzip","nuxt","nuxt-module","nuxtjs"],"created_at":"2024-10-06T16:04:59.352Z","updated_at":"2025-10-09T15:39:39.248Z","avatar_url":"https://github.com/robcresswell.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# nuxt-compress\n\nA simple static asset compression module for Nuxt that runs Gzip and Brotli\ncompression during the build process.\n\nThis is significantly more efficient than compressing files on the fly,\nespecially for Brotli compression, which sacrifices CPU time for greater\ncompression.\n\nFor compression during runtime, see the `compressor` entry in the\n[Nuxt configuration docs](https://nuxtjs.org/api/configuration-render/#compressor)\n\n## Getting Started\n\n1. Install the module\n\n   ```console\n   npm install -D nuxt-compress\n   ```\n\n   OR\n\n   ```console\n   yarn add -D nuxt-compress\n   ```\n\n2. Add `\"nuxt-compress\"` to your\n   [`buildModules`](https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-modules#buildmodules)\n\n   ```js\n   module.exports = {\n     buildModules: ['nuxt-compress'],\n   };\n   ```\n\n## Configuration\n\nThis module provides a simple interface to include\n[compression-webpack-plugin](https://github.com/webpack-contrib/compression-webpack-plugin)\nconfigured for both gzip and brotli compression.\n\nIt uses the same configuration options, which can be supplied as a second\nargument to the entry in `\"modules\"` in your `nuxt.config.js`, or as a distinct\nentry with the key `\"nuxt-compress\"`. See the\n[Nuxt Modules guide](https://nuxtjs.org/guide/modules/) for more information.\n\nFor example:\n\n```js\nmodule.exports = {\n  modules: [\n    [\n      'nuxt-compress',\n      {\n        gzip: {\n          threshold: 8192,\n        },\n        brotli: {\n          threshold: 8192,\n        },\n      },\n    ],\n  ],\n};\n```\n\nOR\n\n```js\nmodule.exports = {\n  modules: ['nuxt-compress'],\n  'nuxt-compress': {\n    gzip: {\n      threshold: 8192,\n    },\n    brotli: {\n      threshold: 8192,\n    },\n  },\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobcresswell%2Fnuxt-compress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobcresswell%2Fnuxt-compress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobcresswell%2Fnuxt-compress/lists"}