-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvite.config.ts
36 lines (35 loc) · 891 Bytes
/
vite.config.ts
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
import { defineConfig, splitVendorChunkPlugin } from 'vite';
import liveReload from 'vite-plugin-live-reload';
import vue from '@vitejs/plugin-vue';
import path from 'path';
import dotenv from 'dotenv';
dotenv.config();
export default defineConfig({
plugins: [
liveReload([path.resolve(__dirname, './resources/views/**/*.pug')]),
splitVendorChunkPlugin(),
vue(),
],
root: 'resources',
base: '/dist/',
resolve: {
// RESOURCES ALIAS
alias: {
'~': path.resolve(__dirname, 'resources', 'ts'),
vue: 'vue/dist/vue.esm-bundler.js',
},
},
build: {
outDir: path.resolve(__dirname, 'public', 'dist'),
emptyOutDir: true,
manifest: true,
rollupOptions: {
input: path.resolve(__dirname, 'resources', 'ts', 'index.ts'),
},
},
server: {
strictPort: true,
port: Number(process.env.VITE_PORT),
host: true,
},
});