mirror of
https://github.com/gosticks/complai.git
synced 2025-10-16 11:45:36 +00:00
33 lines
782 B
TypeScript
33 lines
782 B
TypeScript
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import svg from '@poppanator/sveltekit-svg';
|
|
import type { UserConfig } from 'vite';
|
|
import autoprefixer from 'autoprefixer';
|
|
|
|
const config: UserConfig = {
|
|
plugins: [
|
|
sveltekit(),
|
|
svg({
|
|
includePaths: ['./src/lib/icons/', './src/assets/icons/'],
|
|
svgoOptions: {
|
|
multipass: false,
|
|
plugins: [
|
|
{
|
|
name: 'preset-default',
|
|
// by default svgo removes the viewBox which prevents svg icons from scaling
|
|
// not a good idea! https://github.com/svg/svgo/pull/1461
|
|
params: { overrides: { removeViewBox: false } }
|
|
},
|
|
{ name: 'removeAttrs', params: { attrs: '(fill|stroke|stroke-width)' } }
|
|
]
|
|
}
|
|
})
|
|
],
|
|
css: {
|
|
postcss: {
|
|
plugins: [autoprefixer]
|
|
}
|
|
}
|
|
};
|
|
|
|
export default config;
|