visua-vue/vite.config.ts

36 lines
796 B
TypeScript
Raw Normal View History

2025-07-30 02:03:51 +02:00
// vite.config.ts
import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import vueDevTools from 'vite-plugin-vue-devtools';
import path from 'path';
2025-07-17 11:33:48 +02:00
export default defineConfig({
plugins: [
vue(),
vueDevTools(),
],
resolve: {
alias: {
2025-07-19 02:55:56 +02:00
'@': fileURLToPath(new URL('./src', import.meta.url)),
2025-07-30 02:03:51 +02:00
'@visua': path.resolve(__dirname, './node_modules/@cellule-financiere-pmo/visua/output'),
2025-07-17 11:33:48 +02:00
},
},
2025-07-30 02:03:51 +02:00
build: {
lib: {
entry: path.resolve(__dirname, 'src/index.ts'),
name: 'VisuaVue',
fileName: 'visua-vue',
formats: ['es', 'umd'],
},
rollupOptions: {
external: ['vue'],
output: {
globals: {
vue: 'Vue',
},
},
},
},
});