Once again a weird place to commit, I have already done a lot of work, but I am just bad at using git, okay.
29 lines
798 B
TypeScript
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(),
|
|
],
|
|
}); |