pad.libre-service.eu-etherpad/ui/vite.config.ts
2024-06-02 19:30:43 +02:00

35 lines
825 B
TypeScript

// vite.config.js
import { resolve } from 'path'
import { defineConfig } from 'vite'
import commonjs from '@rollup/plugin-commonjs';
export default defineConfig({
base: '/views/',
server:{
proxy:{
"/static":{
changeOrigin: true,
target: "http://localhost:9001",
}
}
},
plugins: [
commonjs({
requireReturnsDefault: 'auto', // <---- this solves default issue
}),
// vite4
// vitePluginRequire.default()
],
build: {
outDir: resolve(__dirname, '../src/static/oidc'),
rollupOptions: {
input: {
main: resolve(__dirname, 'consent.html'),
nested: resolve(__dirname, 'login.html'),
pad: resolve(__dirname, 'pad.html'),
},
},
emptyOutDir: true,
},
})