-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
48 lines (43 loc) · 1.47 KB
/
vite.config.ts
File metadata and controls
48 lines (43 loc) · 1.47 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
import path from 'node:path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'
let allowedHosts = [
'localhost',
]
if (process.env.VITEST_ALLOWED_HOSTS) {
allowedHosts = allowedHosts.concat(
process.env.VITEST_ALLOWED_HOSTS.split(',').map(h => h.trim())
)
}
export default defineConfig({
clearScreen: false,
root: import.meta.dirname,
plugins: [
vue({ template: { compilerOptions: { isCustomElement: (tag) => tag.startsWith('iconify-icon'), } } }),
tailwindcss()
],
publicDir: path.resolve(import.meta.dirname, 'client/public'),
resolve: {
// dedupe: ['vue'],
// alias: {
// 'vue/server-renderer': path.resolve(import.meta.dirname, 'node_modules/vue/server-renderer/index.mjs'),
// vue: path.resolve(import.meta.dirname, 'node_modules/vue/dist/vue.esm-bundler.js'),
// }
},
server: {
allowedHosts,
watch: {
ignored: [
'**/shared',
'**/server',
'**/storage',
'**/modules/**/server',
'**/.env', // Ignores .env files in the root and subdirectories
'**/.env.*', // Ignores all .env-related files (e.g., .env.local, .env.development)
'**/vite.config.*', // Ignores Vite config files
'**/*.{test,spec}.{ts,js}', // Ignores test files
]
},
}
})