-
Notifications
You must be signed in to change notification settings - Fork 6
/
vite.config.js
43 lines (41 loc) · 1.07 KB
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { sveltekit } from '@sveltejs/kit/vite';
import svg from '@poppanator/sveltekit-svg';
/** @type {import('vite').UserConfig} */
const config = {
build: {
minify: true,
},
plugins: [
sveltekit(),
svg({
svgoOptions: {
multipass: true,
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: 'addClassesToSVGElement',
params: {
classNames: ['st-icon'],
},
},
],
},
}),
],
test: {
environment: 'jsdom',
include: ['./src/**/*.test.ts'],
outputFile: {
html: 'unit-test-results/html-results/index.html',
json: 'unit-test-results/json-results.json',
junit: 'unit-test-results/junit-results.xml',
},
reporters: ['verbose', 'json', 'junit', 'html'],
},
};
export default config;