Files
impost/packages/widget/vite.config.ts
Zoe cfab3d0b8f Initial commit
Once again a weird place to commit, I have already done a lot of work, but I am just bad at using git, okay.
2025-11-17 16:12:26 +00:00

29 lines
798 B
TypeScript

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(),
],
});