-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.js
45 lines (44 loc) · 1.01 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
42
43
44
45
import {defineConfig} from 'vite';
import {resolve} from 'path';
import liveReload from 'vite-plugin-live-reload'
export default defineConfig(() => {
return {
server: {
cors: true,
strictPort: true,
port: 3000,
hmr: {
port: 3000,
host: 'localhost',
protocol: 'ws',
},
},
plugins: [
liveReload(
__dirname + '/src/**/*.php',
__dirname + '/resources/**/*.blade.php',
__dirname + '/assets/**/*.css',
__dirname + '/assets/**/*.js'
),
],
root: '',
base: process.env.NODE_ENV === 'development'
? '/'
: '/dist/',
build: {
// output dir for production build
outDir: resolve(__dirname, './dist'),
target: 'es2020',
manifest: true,
emptyOutDir: true,
rollupOptions: {
input: {
app: resolve(__dirname + '/assets/js/app.js'),
css: resolve(__dirname + '/assets/css/app.css'),
}
},
minify: true,
write: true
},
};
});