cfr #121 Co-authored-by: Christophe Siraut <d@tobald.eu.org> Co-authored-by: bkfox <thomas bkfox net> Co-authored-by: Thomas Kairos <thomas@bkfox.net> Reviewed-on: #131 Co-authored-by: Chris Tactic <ctactic@noreply.git.radiocampus.be> Co-committed-by: Chris Tactic <ctactic@noreply.git.radiocampus.be>
45 lines
1.0 KiB
JavaScript
45 lines
1.0 KiB
JavaScript
import { resolve } from 'path'
|
|
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import commonjs from '@rollup/plugin-commonjs';
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
],
|
|
build: {
|
|
outDir: "../aircox/static/aircox/",
|
|
sourcemap: true,
|
|
|
|
rollupOptions: {
|
|
external: ['vue',],
|
|
input: {
|
|
public: "src/public.js",
|
|
admin: "src/admin.js",
|
|
},
|
|
output: {
|
|
globals: {
|
|
vue: 'Vue',
|
|
},
|
|
assetFileNames: "[name].[ext]",
|
|
chunkFileNames: "[name].js",
|
|
entryFileNames: "[name].js",
|
|
},
|
|
plugins: [commonjs()],
|
|
},
|
|
},
|
|
css: {
|
|
devSourcemap: true,
|
|
},
|
|
resolve: {
|
|
extensions: ['.js', '.ts', '.json', '.vue'],
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
}
|
|
}
|
|
})
|