-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvite.config.ts
More file actions
37 lines (34 loc) · 1.09 KB
/
vite.config.ts
File metadata and controls
37 lines (34 loc) · 1.09 KB
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
import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import { templateCompilerOptions } from '@tresjs/core';
import vue from '@vitejs/plugin-vue';
import vueDevTools from 'vite-plugin-vue-devtools';
const useDevTools = process.env.USE_VITE_DEVTOOLS === 'true';
const plugin = useDevTools ? [vueDevTools()] : [];
// https://vitejs.dev/config/
// vite.config.ts has to be default export
// eslint-disable-next-line no-restricted-exports
export default defineConfig({
plugins: [vue({ ...templateCompilerOptions }), ...plugin],
server: {
// automatically opens in browser
open: true,
port: 8000,
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
// Fixes The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0 when updating packages
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler', // or "modern",
// Silence issue
silenceDeprecations: ['legacy-js-api'],
},
},
},
base: process.env.GH_PAGES === 'true' ? '/mission-control/' : '/',
});