Next.js Discord

Discord Forum

Is there a way to precompress static assets with brotli/gzip during static exports?

Unanswered
Hilsa shad posted this in #help-forum
Open in Discord
Hilsa shadOP
Hello!

Does anyone know if there is a way to precompress static assets with brotli during static exports? Basically for an SSG, so no server. The CDN I use can serve .br files if they are in the same folder as the original files.

Thank you!

1 Reply

Hilsa shadOP
If anyone else is interested, I ended up using the "gzipper" package for this as an npm task than runs after build.