hey
thanks for your anser. Yes i know it's two different locations, that's exactly the problem.
Yes, my package. json has
"scripts": {
"build": "vite build",
"dev": "vite"
},
and I event tried to force the output of the manifest in vite.config.js, but it does not care...
Here is my vite.config.js, maybe something is wrong, I'm way more used to Webpak, so Vite is still in "discover" mode.
import {defineConfig} from 'vite';
import laravel from 'laravel-vite-plugin';
import react from '@vitejs/plugin-react';
export default defineConfig(({command}) => {
const isProduction = command === 'build';
return {
plugins: [
laravel({
input: ['resources/scss/app.scss', 'resources/js/app.jsx'],
refresh: !isProduction,
// buildDirectory: '',
}),
react(),
],
css: {
preprocessorOptions: {
scss: {
quietDeps: true, // Suppresses warnings from dependencies
},
},
},
server: !isProduction
? {
host: '0.0.0.0',
port: 5173,
strictPort: true,
hmr: {
host: 'my-app.ddev.site',
protocol: 'wss',
},
}
: undefined,
build: {
manifest: true,
outDir: 'public/build',
rollupOptions: {
input: {
main: 'resources/js/app.jsx',
styles: 'resources/scss/app.scss',
},
output: {
manualChunks: {
react: ['react', 'react-dom'], // Separate React dependencies into a dedicated chunk
},
entryFileNames: 'assets/[name].js',
chunkFileNames: 'assets/[name].js',
assetFileNames: 'assets/[name].[ext]',
},
},
},
}
});