IT4C.dev/docs/.vuepress/config.js
Ulf Gebhardt d77479beda
feat(other): command dev-prod (#260)
* compress images using `vuepress-plugin-imagemin

compress all images using imagemin plugin

* updated vuepress-plugin-imagemin to 0.1.2

* command: dev-prod

adds a new command `npm run dev-prod` which build the project and then
spins up a http server. This was implemented to be able to test certain
scenarious like image compression.
2025-03-11 22:47:41 +01:00

43 lines
822 B
JavaScript

import { viteBundler } from '@vuepress/bundler-vite'
import Imagemin from 'vuepress-plugin-imagemin'
import { defineUserConfig } from 'vuepress'
import meta from './config/meta'
import theme from './config/theme'
export default defineUserConfig({
lang: 'de-DE',
...meta,
theme,
bundler: viteBundler({}),
plugins: [
Imagemin({
gifsicle: {
optimizationLevel: 7,
interlaced: false,
},
optipng: {
optimizationLevel: 7,
},
mozjpeg: {
quality: 20,
},
pngquant: {
quality: [0.8, 0.9],
speed: 4,
},
svgo: {
plugins: [
{
name: 'removeViewBox',
},
{
name: 'removeEmptyAttrs',
active: false,
},
],
},
}),
],
})