From 80e2c6e358b849aac6114ccb5fa9f54aac5ae05f Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Wed, 30 Jul 2025 02:03:51 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20test=20environment=20setup=20upd?= =?UTF-8?q?ated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 75dd174..59efa8d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,10 +1,10 @@ -import { fileURLToPath, URL } from 'node:url' -import { defineConfig } from 'vitest/config' -import vue from '@vitejs/plugin-vue' -import vueDevTools from 'vite-plugin-vue-devtools' -import path from 'path' +// 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'; -// https://vite.dev/config/ export default defineConfig({ plugins: [ vue(), @@ -13,12 +13,23 @@ export default defineConfig({ resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)), - '@visua': path.resolve(__dirname, './node_modules/@cellule-financiere-pmo/visua/output') + '@visua': path.resolve(__dirname, './node_modules/@cellule-financiere-pmo/visua/output'), }, }, - test: { - globals: true, - environment: 'jsdom', - include: ['test/**/*.spec.ts'], - } -}) + build: { + lib: { + entry: path.resolve(__dirname, 'src/index.ts'), + name: 'VisuaVue', + fileName: 'visua-vue', + formats: ['es', 'umd'], + }, + rollupOptions: { + external: ['vue'], + output: { + globals: { + vue: 'Vue', + }, + }, + }, + }, +});