-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.js
41 lines (39 loc) · 1.04 KB
/
vite.config.js
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
import { resolve } from 'path';
import handlebars from 'vite-plugin-handlebars';
function handlebarsOverride(options) {
const plugin = handlebars(options);
// Currently handleHotUpdate skips further processing, which bypasses
// postcss and in turn tailwind doesn't pick up file changes
delete plugin.handleHotUpdate;
return plugin;
}
export default {
root: "src",
build: {
outDir: '../build',
rollupOptions: {
input: {
main: resolve(__dirname, 'src/index.html'),
components: resolve(__dirname, 'src/components.html'),
},
},
},
plugins: [
handlebarsOverride({
partialDirectory: resolve(__dirname, 'src/components'),
helpers: {
json: (context) => {
return JSON.stringify(context);
}
}
}),
],
server: {
watch: {
usePolling: true,
},
host: true,
strictPort: true,
port: 5173,
}
};