I'm building a multi page app with Vite (migrating from Webpack).
To open the login page in the dev server I have to go to: localhost:3010/login.html
Is it possible to tweak the Vite config to serve login.html with the URL as: localhost:3010/login (without .html)?
// vite.config.js excerpt
export default {
build: {
rollupOptions: {
input: {
index: new URL('./index.html', import.meta.url).pathname,
login: new URL('./login.html', import.meta.url).pathname,
}
}
},
server: {
port: 3010,
proxy: {
'/api': 'http://localhost:5000/',
},
},
};