69 lines
2.2 KiB
JavaScript
69 lines
2.2 KiB
JavaScript
import { defineConfig } from 'vite';
|
|
import laravel from 'laravel-vite-plugin';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
laravel({
|
|
input: [
|
|
'resources/css/app.css',
|
|
'resources/css/nova-grid.css',
|
|
'resources/js/app.js',
|
|
'resources/scss/nova.scss',
|
|
'resources/js/nova.js',
|
|
'resources/js/entry-topbar.jsx',
|
|
'resources/js/entry-search.jsx',
|
|
'resources/js/entry-masonry-gallery.jsx',
|
|
'resources/js/entry-pill-carousel.jsx',
|
|
'resources/js/upload.jsx',
|
|
'resources/js/studio.jsx',
|
|
'resources/js/Pages/ArtworkPage.jsx',
|
|
'resources/js/Pages/Home/HomePage.jsx',
|
|
'resources/js/Pages/Community/LatestCommentsPage.jsx',
|
|
'resources/js/Pages/Messages/Index.jsx',
|
|
'resources/js/profile.jsx',
|
|
'resources/js/feed.jsx',
|
|
'resources/js/settings.jsx',
|
|
'resources/js/entry-forum.jsx',
|
|
],
|
|
// Only watch Blade templates & routes for full-reload triggers
|
|
// (instead of `true` which watches the entire project tree)
|
|
refresh: [
|
|
'resources/views/**',
|
|
'routes/**',
|
|
],
|
|
}),
|
|
],
|
|
|
|
server: {
|
|
watch: {
|
|
// Exclude heavy dirs from the filesystem watcher to cut memory
|
|
ignored: [
|
|
'**/node_modules/**',
|
|
'**/vendor/**',
|
|
'**/storage/**',
|
|
'**/public/build/**',
|
|
'**/.git/**',
|
|
],
|
|
},
|
|
},
|
|
|
|
// Pre-bundle heavy deps so Vite doesn't re-analyse them on every HMR update
|
|
optimizeDeps: {
|
|
include: [
|
|
'react',
|
|
'react-dom',
|
|
'react/jsx-runtime',
|
|
'react/jsx-dev-runtime',
|
|
'@inertiajs/react',
|
|
'framer-motion',
|
|
],
|
|
},
|
|
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: ['resources/js/test/setupTests.js'],
|
|
include: ['resources/js/**/*.test.{js,jsx}'],
|
|
},
|
|
});
|