2023-04-05 19:33:31 +02:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import { viteStaticCopy } from 'vite-plugin-static-copy'
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
plugins: [
|
|
|
|
viteStaticCopy({
|
|
|
|
targets: [
|
|
|
|
{
|
|
|
|
src: './static/[!.]*',
|
|
|
|
dest: './',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
})
|
|
|
|
],
|
|
|
|
publicDir: false, // disable copy `public/` to outDir
|
|
|
|
build: {
|
|
|
|
rollupOptions: {
|
|
|
|
input: {
|
|
|
|
main: './main.ts',
|
2023-09-05 22:48:02 +02:00
|
|
|
logbook: './logbook.ts',
|
2023-04-05 19:33:31 +02:00
|
|
|
// Example for more entry points
|
|
|
|
// test: './src/test.ts',
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
entryFileNames: '[name].js',
|
|
|
|
assetFileNames: '[name].css',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
manifest: true, // generate manifest.json in outDir
|
|
|
|
outDir: '../static/',
|
|
|
|
},
|
|
|
|
css: {
|
|
|
|
devSourcemap: true, // disabled by default because of performance reasons
|
|
|
|
},
|
|
|
|
})
|