forked from evanspj/kirby-vite-tailwindcss-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
33 lines (32 loc) · 888 Bytes
/
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
import liveReload from 'vite-plugin-live-reload'
import { resolve } from 'path'
export default () => ({
// set the input source path
root: 'src',
server: {
strictPort: true,
// Set host to true if you use a non-localhost php server, like laravel valet
// host: true
port: 3000
},
build: {
outDir: resolve(process.cwd(), 'public/dist'), // production output directory
emptyOutDir: true,
manifest: true,
rollupOptions: {
input: resolve(process.cwd(), 'src/index.js'), // input source path for rollupjs
output: {
// remove hashes from file names
entryFileNames: '[name].js',
chunkFileNames: '[name].js',
assetFileNames: '[name].[ext]'
}
}
},
plugins: [
// add live reload to the php pages
liveReload([
'content/**/*',
'site/**/*.php'
], { root: process.cwd() })]
})