import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
build: {
rollupOptions: {
output: {
assetFileNames: (assetInfo) => {
return 'cart/assets/[name][extname]';
},
chunkFileNames: 'cart/assets/[name].js',
entryFileNames: 'cart/assets/[name].js'
}
}
},
server: {
proxy: {
'/api': {
target: 'http://127.0.0.1:8080',
changeOrigin: true,
secure: false
}
}
}
})
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
server: {
proxy: {
'/api': {
target: 'http://127.0.0.1:8080',
rewrite: path => path.replace('/api', ''),
changeOrigin: true,
secure: false
}
}
}
})