import { defineConfig } from 'vite'

export default defineConfig({
    build: {
        target: ['chrome107', 'edge107', 'firefox104', 'safari16'],
        outDir: './build/FormBuilder/',
        lib: {
            entry: ['./src/FormBuilder/FormBuilder.ts'],
            name: 'FormBuilder',
            fileName: 'FormBuilder'
        },
        rollupOptions: {
            external: ['jquery', /assets\/js\/tinymce/],
            output: {
                globals: {
                    jquery: 'jQuery',
                    'assets/js/tinymce': 'tinymce'
                }
            }
        }
    }
})