forked from reachweb/statamic-resrv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite-frontend.config.js
More file actions
33 lines (32 loc) · 967 Bytes
/
Copy pathvite-frontend.config.js
File metadata and controls
33 lines (32 loc) · 967 Bytes
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
import { defineConfig } from 'vite';
import tailwindcss from 'tailwindcss';
import autoprefixer from 'autoprefixer';
export default defineConfig({
build: {
outDir: 'resources/frontend',
emptyOutDir: false,
rollupOptions: {
input: {
main: 'resources/js/resrv-frontend.js',
tailwind: 'resources/css/resrv-tailwind.css'
},
output: {
entryFileNames: 'js/resrv-frontend.js',
assetFileNames: (assetInfo) => {
if (assetInfo.name.includes('resrv-tailwind.css')) {
return 'css/resrv-tailwind.css';
}
return 'css/[name].[ext]';
},
}
}
},
css: {
postcss: {
plugins: [
tailwindcss('./tailwind-frontend.config.js'),
autoprefixer(),
],
},
},
});