import { defineConfig } from 'vite' import path from 'node:path' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' // https://vitejs.dev/config/ export default defineConfig({ build: { lib: { entry: path.resolve(__dirname, 'src/index.ts'), name: 'vue-psych', fileName: (format) => format === 'es' ? `index.js` : `index.${format}.js` }, rollupOptions: { // make sure to externalize deps that shouldn't be bundled // into your library external: ['vue'], output: { // Provide global variables to use in the UMD build // for externalized deps globals: { vue: 'Vue' } } } }, plugins: [ vue(), vueJsx(), ] })