-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.js
More file actions
executable file
·75 lines (70 loc) · 1.84 KB
/
Copy pathvite.config.js
File metadata and controls
executable file
·75 lines (70 loc) · 1.84 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
import { defineConfig } from "vite";
import symfonyPlugin from "vite-plugin-symfony";
import { viteStaticCopy } from 'vite-plugin-static-copy'
import { dirname, resolve } from 'path'
import { fileURLToPath } from 'url'
const basicPlaygroundDir = dirname(fileURLToPath(import.meta.url))
export default defineConfig({
base: '/app/',
define: {
global: 'globalThis',
},
server: {
// Required to listen on all interfaces
host: '0.0.0.0',
watch: {
ignored: [
'**/.idea/**',
'**/.vscode/**',
'**/tests/**',
'**/var/**',
'**/vendor/**',
],
}
},
plugins: [
symfonyPlugin({
stimulus: './assets/stimulus/controllers.json',
viteDevServerHostname: 'localhost',
}),
viteStaticCopy({
targets: [
{
src: './assets/static/',
dest: '.',
},
],
}),
],
build: {
assetsInlineLimit: 0,
outDir: 'public/app',
manifest: true,
rollupOptions: {
input: {
app: './assets/app.ts',
theme: './assets/theme.scss'
},
},
minify: true,
},
resolve: {
alias: {
'~': resolve(basicPlaygroundDir, 'assets'),
'../images': resolve(basicPlaygroundDir, 'assets/hyper-theme/scss/images'),
'../fonts': resolve(basicPlaygroundDir, 'assets/hyper-theme/scss/fonts')
}
},
css: {
preprocessorOptions: {
scss: {
silenceDeprecations: [
'import',
'mixed-decls',
'color-functions',
'global-builtin'
]
}
}
}
});