We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 243a400 commit 960efceCopy full SHA for 960efce
vite.config.ts
@@ -4,7 +4,7 @@ import laravel from 'laravel-vite-plugin';
4
import { resolve } from 'node:path';
5
import { defineConfig } from 'vite';
6
7
-export default defineConfig({
+export default defineConfig( ({ command }) => ({
8
plugins: [
9
laravel({
10
input: ['resources/css/app.css', 'resources/js/app.tsx'],
@@ -14,9 +14,9 @@ export default defineConfig({
14
react(),
15
tailwindcss(),
16
],
17
- server: {
+ server: command === 'serve' ? {
18
cors: true,
19
- },
+ } : {},
20
esbuild: {
21
jsx: 'automatic',
22
},
0 commit comments