You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1008 B
JavaScript

import { defineConfig, loadEnv } from 'vite'
import { resolve } from 'path'
export default defineConfig(({ mode }) => {
// Load environment variables with no prefixes
process.env = { ...process.env, ...loadEnv(mode, process.cwd(), '') }
return {
base: process.env.BASE_URL,
css: { preprocessorOptions: { scss: { charset: false } } },
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
login: resolve(__dirname, 'login.html'),
orari: resolve(__dirname, 'orari.html'),
prenota: resolve(__dirname, 'prenota.html'),
},
},
},
server: {
proxy: {
'/api': {
target: 'http://localhost:4000/api',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),
},
},
},
}
})