import { resolve } from 'path'; import { defineConfig } from 'vite'; import dts from 'vite-plugin-dts'; export default defineConfig({ build: { target: 'es2022', lib: { entry: resolve(__dirname, 'src/entry.ts'), formats: ['es'], fileName: 'impost', }, rollupOptions: { external: [/^lit/, /^@lit\//], output: { preserveModules: false, dir: 'dist', }, }, // WARN: this setting has caused issues for me in the past, but now it // seems to work fine. I'm not sure why, but minifying the bundle saves // 5KB, and it doesnt *cause* issues, so I'm leaving it on. minify: true, }, plugins: [ dts(), ], });