-
Notifications
You must be signed in to change notification settings - Fork 45
/
vite.config.js
35 lines (34 loc) · 1.14 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
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/auth.css',
'resources/js/auth.js',
],
refresh: true,
}),
],
build: {
rollupOptions: {
minify: false,
input: {
// Include both CSS and JS files as separate entry points
'scripts': 'resources/js/auth.js',
'styles': 'resources/css/auth.css',
},
output: {
entryFileNames: `assets/[name].js`,
assetFileNames: ({ name }) => {
if (name.endsWith('.css')) return 'assets/[name].css';
return 'assets/[name].[ext]';
},
// We can omit chunkFileNames if we are not expecting any chunks, but it's good to specify just in case
chunkFileNames: 'assets/[name].js',
}
},
// Optionally disable code splitting if it's not desired
manualChunks: () => 'all-in-one',
}
});