pad.libre-service.eu-etherpad/ui/vite.config.ts

48 lines
1.2 KiB
TypeScript
Raw Normal View History

// vite.config.js
import { resolve } from 'path'
import { defineConfig } from 'vite'
export default defineConfig({
base: '/views/',
build: {
commonjsOptions:{
transformMixedEsModules: true,
},
outDir: resolve(__dirname, '../src/static/oidc'),
rollupOptions: {
input: {
main: resolve(__dirname, 'consent.html'),
nested: resolve(__dirname, 'login.html'),
},
},
emptyOutDir: true,
},
server:{
proxy:{
'/static':{
target: 'http://localhost:9001',
changeOrigin: true,
secure: false,
},
'/views/manifest.json':{
target: 'http://localhost:9001',
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/views/, ''),
},
'/locales.json':{
target: 'http://localhost:9001',
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/views/, ''),
},
'/locales':{
target: 'http://localhost:9001',
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/views/, ''),
},
}
}
})