Repository navigation
Expand file tree
/
Copy pathvite.config.mjs
More file actions
57 lines (55 loc) · 1.63 KB
/
Copy pathvite.config.mjs
File metadata and controls
57 lines (55 loc) · 1.63 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
import { defineConfig } from 'vite';
import { fileURLToPath, URL } from 'node:url';
import mkcert from'vite-plugin-mkcert';
import vuePlugin from '@vitejs/plugin-vue';
import manifestSRIPlugin from 'vite-plugin-manifest-sri';
import symfonyPlugin from 'vite-plugin-symfony';
import dns from 'dns';
dns.setDefaultResultOrder('verbatim');
export default defineConfig({
plugins: [
mkcert(),
vuePlugin(),
manifestSRIPlugin(),
symfonyPlugin({
refresh: true,
sriAlgorithm: 'sha384',
}),
],
build: {
outDir: 'public/app/themes/default/build',
rollupOptions: {
input: {
public: './public/app/themes/default/js/src/public.js',
blocks: './public/app/themes/default/js/src/blocks.js',
},
},
sourcemap: true,
// don't inline assets
assetsInlineLimit: 0,
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./public/app/themes/default/js/src', import.meta.url)),
},
// the default plus .vue
extensions: ['.vue', '.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json'],
},
css: {
devSourcemap: true,
},
server: {
host: true,
// @todo-wordpress change port number
port: 9034,
origin: 'https://localhost:9034',
strictPort: true,
https: true,
watch: {
// this is in part needed because the symfony plugin ignores the public dir completely
ignored: ['**/vendor/**', '**/var/**'],
},
},
appType: 'custom',
clearScreen: false,
});