-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
45 lines (43 loc) · 1.06 KB
/
vite.config.ts
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
44
45
/*
* © 2024 Doriel Rivalet
* Use of this source code is governed by a MIT license that can be
* found in the LICENSE file.
*/
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
import { visualizer } from 'rollup-plugin-visualizer';
import { vite as vidstack } from 'vidstack/plugins';
export default defineConfig({
css: {
preprocessorOptions: {
scss: {
additionalData: `
@use 'src/variables.scss' as variables;
@use 'src/mixins.scss' as mixins;
`,
},
},
},
plugins: [
// This filter will only parse files placed in a `/player` directory.
vidstack({ include: /player\// }),
sveltekit(),
visualizer({
filename: './dist/stats.html',
template: 'sunburst', // or sunburst, network, etc.
}),
],
ssr: {
noExternal:
process.env.NODE_ENV === 'production'
? ['@carbon/charts', 'three']
: ['three'],
},
define: {
'process.env.NODE_ENV':
process.env.NODE_ENV === 'production' ? '"production"' : '"development"',
},
test: {
include: ['src/**/*.{test,spec}.{js,ts}'],
},
});