import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';

export default defineConfig({
  plugins: [
    vue({
      customElement: true,
    }),
  ],
  build: {
    lib: {
      entry: 'src/register.ts',
      name: 'OmnimedWebComponents',
      formats: ['es', 'iife'],
      fileName: (format) => `omnimed-web-components.${format}.js`,
    },
  },
});
