-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.js
44 lines (43 loc) · 1.53 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
import { defineConfig } from "vite";
import laravel, { refreshPaths } from "laravel-vite-plugin";
export default defineConfig({
build: {
emptyOutDir: true,
rollupOptions: {
output: {
assetFileNames: (assetInfo) => {
let extType = assetInfo.name.split(".").pop();
if (/png|jpe?g|svg|gif|tiff|bmp|ico/i.test(extType)) {
extType = "images";
}
return `assets/${extType}/[name]-[hash][extname]`;
},
entryFileNames: "assets/js/[name]-[hash].js",
},
},
},
plugins: [
laravel({
input: [
"resources/css/app.css",
"resources/js/app.js",
"resources/js/tiptap/extensions.js",
"resources/js/tiptap/eventHandler.js",
"../../../../resources/js/tiptap/extensions.js",
"../../../../resources/js/tiptap/eventHandler.js",
"../../../../resources/css/filament/admin/theme.css",
"../../../../resources/css/filacms.css",
],
refresh: [
...refreshPaths,
"../../../../resources/css/filacms.css",
"app/Filament/**",
"app/Forms/Components/**",
"app/Livewire/**",
"app/Infolists/Components/**",
"app/Providers/Filament/**",
"app/Tables/Columns/**",
],
}),
],
});