-
Feature request 🚀Chromium |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 1 reply
-
Any others? Aka, Currently plugin support custom algorithm |
Beta Was this translation helpful? Give feedback.
-
Here is a simple example for zstd usage.
import { compress } from '@mongodb-js/zstd'
import { compression } from 'vite-plugin-compression2'
defineConfig({
plugins: [
// .... your vite's plugins
compression < { level: number } > ({
algorithm(buf, opt) {
return compress(buf as any, opt)
},
compressionOptions: {
level: 9
},
filename: '[path][base].zst'
})
]
}) then run vite build |
Beta Was this translation helpful? Give feedback.
-
Here is a simple usage. Can you have a try? |
Beta Was this translation helpful? Give feedback.
-
I get .gz extensions, not sure if that is expected, the files are compressed. And also type errors. |
Beta Was this translation helpful? Give feedback.
-
Oh, you should set filename option :) |
Beta Was this translation helpful? Give feedback.
-
Then it works ok, the types are a bit misleading. |
Beta Was this translation helpful? Give feedback.
-
Hi @nonzzz , @beckend . Could you share a complete example of zstd integration for this plugin? |
Beta Was this translation helpful? Give feedback.
-
@cheeeasy2501 I'll move this issue to discussion |
Beta Was this translation helpful? Give feedback.
-
@cheeeasy2501 Already created an answer. Check the discussions pls. Or you have any problem can see normal example |
Beta Was this translation helpful? Give feedback.
Here is a simple example for zstd usage.
then run vite build