forked from thedevdojo/wave
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
25 lines (23 loc) · 833 Bytes
/
Copy pathvite.config.js
File metadata and controls
25 lines (23 loc) · 833 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
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import fs from 'fs';
import path from 'path';
import tailwindcss from "@tailwindcss/vite";
const themeFilePath = path.resolve(__dirname, 'theme.json');
const activeTheme = fs.existsSync(themeFilePath) ? JSON.parse(fs.readFileSync(themeFilePath, 'utf8')).name : 'anchor';
console.log(`Active theme: ${activeTheme}`);
export default defineConfig({
plugins: [
tailwindcss(),
laravel({
input: [
`resources/themes/${activeTheme}/assets/css/app.css`,
`resources/themes/${activeTheme}/assets/js/app.js`,
'resources/css/filament/admin/theme.css',
],
refresh: [
`resources/themes/${activeTheme}/**/*`,
],
}),
],
});