17 lines
348 B
TypeScript
17 lines
348 B
TypeScript
import { defineConfig } from 'vite'
|
|
import preact from '@preact/preset-vite'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [preact()],
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3000',
|
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
})
|