🔧 Use Vite for build (#3199)

Co-authored-by: Brandon Nifong <brandon@tendency.me>
This commit is contained in:
Ben Word
2025-01-04 08:45:24 -05:00
committed by GitHub
parent bc60adb1b5
commit a482791397
19 changed files with 3749 additions and 7787 deletions

34
vite.config.js Normal file
View File

@@ -0,0 +1,34 @@
import { defineConfig } from 'vite'
import laravel from 'laravel-vite-plugin'
import {
wordpressPlugin,
wordpressRollupPlugin,
wordpressThemeJson,
} from './resources/js/build/wordpress'
import tailwindConfig from './tailwind.config.js'
export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
'resources/css/editor.css',
'resources/js/editor.js',
],
refresh: true,
}),
wordpressPlugin(),
wordpressRollupPlugin(),
// Generate the theme.json file in the public/build/assets directory
// based on the Tailwind config and the theme.json file from base theme folder
wordpressThemeJson({
tailwindConfig,
disableTailwindColors: false,
disableTailwindFonts: false,
disableTailwindFontSizes: false,
}),
],
})