@dashers/nuxt-brotli
v0.0.2
Published
Simple Nuxt module for supporting brotli compression
Downloads
1
Readme
Add brotli compression in to your Nuxt project
This module is based on this article: https://blog.lichter.io/posts/nuxtjs-on-brotli/#add-brotli-to-nuxt.js.
How to use
Simply add module in your nuxt.config.js
This add brotli compression for all content.
modules: [
'@dashers/nuxt-brotli'
]
If you have an for example api inside, you can avoid brotli compression with defined filter
in option.
modules: [
['@dashers/nuxt-brotli', {
filter: (req, res) => {
if (/^\/api/.test(req.originalUrl)) {
return false
}
return shrinkRay.filter(req, res)
}
}
]
]