2025-07-30 02:03:51 +02:00
|
|
|
// vite.config.ts
|
2025-08-02 23:24:38 +02:00
|
|
|
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: [
|
2025-07-31 01:50:55 +02:00
|
|
|
vue(),
|
|
|
|
vueDevTools()
|
2025-07-17 11:33:48 +02:00
|
|
|
],
|
|
|
|
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',
|
2025-07-31 01:50:55 +02:00
|
|
|
fileName: (format) => format === 'es' ? 'visua-vue.es.js' : 'visua-vue.umd.cjs',
|
2025-07-30 02:03:51 +02:00
|
|
|
formats: ['es', 'umd'],
|
|
|
|
},
|
|
|
|
rollupOptions: {
|
2025-08-02 23:24:38 +02:00
|
|
|
external: ['vue', 'primevue', 'vue-router', 'primeicons'],
|
2025-07-30 02:03:51 +02:00
|
|
|
output: {
|
|
|
|
globals: {
|
|
|
|
vue: 'Vue',
|
2025-08-02 23:24:38 +02:00
|
|
|
primevue: 'PrimeVue',
|
|
|
|
'vue-router': 'VueRouter',
|
|
|
|
primeicons: 'primeicons'
|
2025-07-30 02:03:51 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2025-08-02 23:24:38 +02:00
|
|
|
})
|