-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.js
More file actions
50 lines (49 loc) · 1.15 KB
/
vite.config.js
File metadata and controls
50 lines (49 loc) · 1.15 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
38
39
40
41
42
43
44
45
46
47
48
49
50
import { defineConfig } from 'vite';
import { commonjsDeps, commonjsDepsPaths } from '@koumoul/vjsf/utils/build.js'
import vue from "@vitejs/plugin-vue";
import Components from 'unplugin-vue-components/vite';
import vuetify from "vite-plugin-vuetify";
import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
server: {
port: 8050
},
preview: {
port: 8050,
},
resolve: {
alias: {
// vue: '@vue/compat',
"@": path.resolve(__dirname, "./src"),
},
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
},
plugins: [
vue({
compilerOptions: {
// Your options go here
isCustomElement: (tag) => tag.startsWith('v-'), // Example of a custom option
},
}),
vuetify({
autoImport: { labs: true }
}),
Components(),
],
define: {
'process.env': process.env
},
build: {
target: 'esnext', // you can also use 'es2020' here
/*commonjsOptions: {
include: commonjsDepsPaths,
},*/
},
optimizeDeps: {
include: commonjsDeps,
esbuildOptions: {
target: 'esnext', // you can also use 'es2020' here
},
},
})