mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-12-24 18:51:18 +01:00
37 lines
836 B
TypeScript
37 lines
836 B
TypeScript
import { defineConfig } from 'vite'
|
|
import {viteStaticCopy} from "vite-plugin-static-copy";
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [viteStaticCopy({
|
|
targets: [
|
|
{
|
|
src: '../src/locales',
|
|
dest: ''
|
|
}
|
|
]
|
|
}), react({
|
|
babel: {
|
|
plugins: ['babel-plugin-react-compiler'],
|
|
}})],
|
|
base: '/admin',
|
|
build:{
|
|
outDir: '../src/templates/admin',
|
|
emptyOutDir: true,
|
|
},
|
|
server:{
|
|
proxy: {
|
|
'/socket.io/*': {
|
|
target: 'http://localhost:9001',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, '')
|
|
},
|
|
'/admin-auth/': {
|
|
target: 'http://localhost:9001',
|
|
changeOrigin: true,
|
|
}
|
|
}
|
|
}
|
|
})
|