Skip to content

Commit

Permalink
testing pre compressed gzip in build
Browse files Browse the repository at this point in the history
  • Loading branch information
buffet-time committed Oct 1, 2024
1 parent dc44277 commit 4c99906
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ import { minify } from 'rollup-plugin-swc-minify'

// Gzip importing
import gzipPlugin from 'rollup-plugin-gzip'
import { promisify } from 'node:util'
import { brotliCompress } from 'node:zlib'

const brotliPromise = promisify(brotliCompress)

export default defineConfig({
build: {
Expand All @@ -27,10 +23,7 @@ export default defineConfig({

plugins: [
vue(), // Testing to see if this ends up delivering Brotli compression
gzipPlugin({
customCompression: (content) => brotliPromise(Buffer.from(content)),
fileName: '.br',
}),
gzipPlugin(),
],
resolve: {
alias: {
Expand Down

0 comments on commit 4c99906

Please sign in to comment.