-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
80 lines (78 loc) · 2.42 KB
/
vite.config.js
File metadata and controls
80 lines (78 loc) · 2.42 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// INTERLOCK IS LICENSED UNDER GNU AGPLv3
// DBLANQUE & BR Consulting S.R.L.
// File: vite.config.js
import { defineConfig } from 'vite';
import { createVuePlugin } from "vite-plugin-vue2";
import { VuetifyResolver } from 'unplugin-vue-components/resolvers';
import Components from 'unplugin-vue-components/vite';
const path = require("path");
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
createVuePlugin({
// compilerOptions: { whitespace: 'preserve' }, // Better Debugging
transpileDependencies: [
'vuetify'
],
pluginOptions: {
i18n: {
locale: 'en',
fallbackLocale: 'en',
localeDir: 'locales',
enableInSFC: false,
enableBridge: false
}
}
}),
Components({
resolvers: [
VuetifyResolver(),
],
// Needed if we ever use TS and require VueRouter
types: [{
from: 'vue-router',
names: ['RouterLink', 'RouterView'],
}],
}),
// Required to fix strange HMR issue with Vue 2 Router Initialization
// There is some Circular Dependency Screwing things up.
// https://github.com/vitejs/vite/issues/3033
// https://github.com/vitejs/vite/issues/2466
{
name: "singleHMR",
handleHotUpdate({ modules }) {
modules.map((m) => {
m.importedModules = new Set();
m.importers = new Set();
});
return modules;
},
},
],
server: {
hmr: {
// protocol: 'ws',
// host: 'localhost',
clientPort: 443,
}
},
watch: {
usePolling: true
},
resolve: {
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
alias: { "@": path.resolve(__dirname, "./src") },
},
build: {
target: 'esnext',
// sourcemap: true,
// minify: false,
// rollupOptions: {
// output: {
// entryFileNames: `[name]` + random_hash + `.js`,
// chunkFileNames: `[name]` + random_hash + `.js`,
// assetFileNames: `[name]` + random_hash + `.[ext]`
// }
// }
},
})