import { defineConfig } from 'vite' import { basename, extname, resolve } from 'path' const stripExt = path => basename(path, extname(path)) export default defineConfig({ build: { rollupOptions: { input: Object.fromEntries( [ // Entry points 'index.html', 'login.html', 'user.html', 'game.html', ].map(path => [stripExt(path), resolve(__dirname, path)]) ), }, }, server: { proxy: { '/api': 'http://127.0.0.1:4000', }, }, plugins: [], })