-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.js
More file actions
43 lines (39 loc) · 1.24 KB
/
Copy pathvite.config.js
File metadata and controls
43 lines (39 loc) · 1.24 KB
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
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/css/frontpage.css',
'resources/css/animations.css',
'resources/js/app.js',
'resources/js/bootstrap.js',
'resources/js/page-transitions.js',
'resources/js/products.js',
'resources/js/script.js',
'resources/css/check.css',
'resources/css/dashboard.css',
// Remove the 'resources/images/' entry - this is not how images are handled
],
refresh: true,
publicDirectory: 'public',
}),
],
server: {
host: '0.0.0.0',
hmr: {
host: 'localhost',
},
},
// Add this section to properly handle image assets
build: {
assetsInlineLimit: 0, // Ensures images are processed as files rather than being inlined
},
// Configure asset handling
resolve: {
alias: {
'@': '/resources', // This allows you to use @/images/... in your imports
},
},
});