Added prototype for bundling files.

This commit is contained in:
SamTV12345 2024-06-02 19:30:43 +02:00
parent 5809e9286f
commit ffe40b82c9
13 changed files with 579 additions and 72 deletions

View file

@ -1,15 +1,33 @@
// 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,