-
Notifications
You must be signed in to change notification settings - Fork 377
/
vite.config.js
79 lines (75 loc) · 2.5 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import { defineConfig, loadEnv } from 'vite';
import esmifyPlugin from './esmify';
// import fs from 'fs';
import laravel from 'laravel-vite-plugin';
import mkcert from 'vite-plugin-mkcert';
import { resolve } from 'path';
// import path from 'path';
import vuePlugin from '@vitejs/plugin-vue';
export default ({ mode }) => {
process.env = {...process.env, ...loadEnv(mode, process.cwd())};
return defineConfig({
base: './',
server: {
port: 3331,
host: '127.0.0.1',
hmr: {
protocol: 'wss',
host: 'localhost',
},
https: true,
},
resolve: {
alias: [
{
find: '&',
replacement: resolve( __dirname, 'resources' ),
}, {
find: '~',
replacement: resolve( __dirname, 'resources/ts' ),
},
]
},
plugins: [
laravel({
input: [
'resources/ts/bootstrap.ts',
'resources/ts/app.ts',
'resources/ts/auth.ts',
'resources/ts/pos.ts',
'resources/ts/pos-init.ts',
'resources/ts/setup.ts',
'resources/ts/update.ts',
'resources/ts/dashboard.ts',
'resources/ts/cashier.ts',
'resources/ts/lang-loader.ts',
'resources/ts/dev.ts',
'resources/ts/popups.ts',
'resources/ts/widgets.ts',
'resources/scss/app.scss',
'resources/scss/light.scss',
'resources/scss/dark.scss',
'resources/scss/grid.scss',
'resources/scss/animations.scss',
'resources/scss/typography.scss',
'resources/scss/fonts.scss',
'resources/scss/line-awesome/1.3.0/scss/line-awesome.scss',
],
refresh: [
'resources/views/**',
'resources/sass/**'
],
}),
mkcert(),
// esmifyPlugin(),
vuePlugin({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
],
});
}