-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathvite.config.js
79 lines (77 loc) · 2.68 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} from 'vite'
import laravel from 'laravel-vite-plugin'
import path from 'path'
import {viteStaticCopy} from 'vite-plugin-static-copy'
export default defineConfig({
plugins: [
laravel([
'resources/js/app.js',
]),
viteStaticCopy({
targets: [
{
src: 'node_modules/tom-select/dist/css/*',
dest: '../plugins/tom-select/css'
},
{
src: 'node_modules/tom-select/dist/js/*',
dest: '../plugins/tom-select/js'
},
{
src: 'node_modules/vanilla-datetimerange-picker/dist/vanilla-datetimerange-picker.css',
dest: '../plugins/vanilla-datetimerange-picker'
},
{
src: 'node_modules/vanilla-datetimerange-picker/dist/vanilla-datetimerange-picker.js',
dest: '../plugins/vanilla-datetimerange-picker'
},
{
src: 'node_modules/chart.js/dist/chart.umd.js',
dest: '../plugins/chart.js'
},
{
src: 'node_modules/moment/moment.js',
dest: '../plugins/moment'
},
{
src: 'node_modules/moment/min/moment.min.js',
dest: '../plugins/moment'
},
{
src: 'node_modules/alpinejs/dist/cdn.min.js',
dest: '../plugins/alpinejs'
},
{
src: 'node_modules/bootstrap-icons/*',
dest: '../plugins/bootstrap-icons'
},
{
src: 'resources/img',
dest: '../'
},
{
src: 'resources/public/*',
dest: '../'
},
]
})
],
resolve: {
alias: {
'~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap'),
'~@fortawesome': path.resolve(__dirname, 'node_modules/@fortawesome'),
'~admin-lte-v4': path.resolve(__dirname, 'node_modules/admin-lte-v4'),
'~flatpickr': path.resolve(__dirname, 'node_modules/flatpickr'),
'~tippy.js': path.resolve(__dirname, 'node_modules/tippy.js'),
}
},
build: {
rollupOptions: {
output: {
entryFileNames: `assets/[name].js`,
chunkFileNames: `assets/[name].js`,
assetFileNames: `assets/[name].[ext]`
}
}
}
})