Files
cloudron-box/dashboard/vite.config.mjs

56 lines
1.8 KiB
JavaScript
Raw Normal View History

2024-10-04 17:43:45 +02:00
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
2024-10-04 17:43:45 +02:00
import { resolve } from 'path';
import injectMetaTags from './injectMetaTags.vite.plugin.js';
2024-10-04 17:43:45 +02:00
export default defineConfig({
plugins: [
vue(),
injectMetaTags([
resolve('activation.html'),
resolve('filemanager.html'),
resolve('index.html'),
resolve('oidc_login.html'),
resolve('oidc_error.html'),
resolve('oidc_interaction_confirm.html'),
resolve('oidc_interaction_abort.html'),
resolve('logs.html'),
resolve('passwordreset.html'),
resolve('restore.html'),
resolve('setup.html'),
resolve('setupaccount.html'),
resolve('terminal.html'),
]),
],
server: {
fs: {
// Allow serving files from one level up to the project root for monaco editor assets
2024-12-26 12:19:48 +01:00
allow: [ '../../../' ]
},
},
2024-10-04 17:43:45 +02:00
// https://vitejs.dev/guide/build.html#multi-page-app
build: {
emptyOutDir: false, // we share dist/
2024-10-04 17:43:45 +02:00
rollupOptions: {
input: {
activation: resolve('activation.html'),
appstatus: resolve('appstatus.html'),
authcallback: resolve('authcallback.html'),
filemanager: resolve('filemanager.html'),
2024-10-04 17:43:45 +02:00
index: resolve('index.html'),
oidc_login: resolve('oidc_login.html'),
2024-12-13 23:02:31 +01:00
oidc_error: resolve('oidc_error.html'),
2024-12-14 00:35:31 +01:00
oidc_interaction_confirm: resolve('oidc_interaction_confirm.html'),
oidc_interaction_abort: resolve('oidc_interaction_abort.html'),
logs: resolve('logs.html'),
2024-10-04 17:43:45 +02:00
notfound: resolve('notfound.html'),
passwordreset: resolve('passwordreset.html'),
restore: resolve('restore.html'),
setup: resolve('setup.html'),
setupaccount: resolve('setupaccount.html'),
2024-10-04 21:04:08 +02:00
terminal: resolve('terminal.html'),
2024-10-04 17:43:45 +02:00
},
},
},
});