I have my frontend structure as follow
And this is my vite-config
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
export default defineConfig({
build: {
rollupOptions: {
input: {
app: 'app.html',
home: 'index.html',
privacyPolicy: 'privacy-policy.html',
},
},
},
server: {
},
plugins: [
react(),
],
});
I need to serve the index.html at the root route as it’s in tailwind, and need my react application to be served under /auth or /dashboard routes. I am able to get this working with NGINX in production mode, but I am having issues with getting it working in development mode as I keep getting 404 issues.
I can use some suggestions on a better solution to this.