2022-11-22 02:23:14 +01:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import solidPlugin from 'vite-plugin-solid';
|
|
|
|
|
2022-11-25 03:47:14 +01:00
|
|
|
const backend = 'http://127.0.0.1:6969';
|
|
|
|
|
2022-11-22 02:23:14 +01:00
|
|
|
export default defineConfig({
|
|
|
|
plugins: [solidPlugin()],
|
|
|
|
server: {
|
|
|
|
port: 3000,
|
2022-11-25 03:47:14 +01:00
|
|
|
proxy: {
|
|
|
|
'/api': {
|
|
|
|
target: backend,
|
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
|
|
|
},
|
|
|
|
},
|
2022-11-22 02:23:14 +01:00
|
|
|
},
|
|
|
|
build: {
|
|
|
|
target: 'esnext',
|
|
|
|
},
|
|
|
|
});
|