36 lines
856 B
TypeScript
36 lines
856 B
TypeScript
// 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';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(), // compile les .vue
|
|
vueDevTools(), // plugin dev (optionnel)
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
'@visua': path.resolve(__dirname, './node_modules/@cellule-financiere-pmo/visua/output'),
|
|
},
|
|
},
|
|
build: {
|
|
lib: {
|
|
entry: path.resolve(__dirname, 'src/index.ts'),
|
|
name: 'VisuaVue',
|
|
fileName: 'visua-vue',
|
|
formats: ['es', 'umd'],
|
|
},
|
|
rollupOptions: {
|
|
external: ['vue'],
|
|
output: {
|
|
globals: {
|
|
vue: 'Vue',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|