This turns the project into a monorepo using pnpm workspaces, dramatically simplifying the build process. It also fixes a lot of bugs and just generally makes the codebase a lot cleaner.
26 lines
569 B
TypeScript
26 lines
569 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',
|
|
},
|
|
},
|
|
minify: true
|
|
},
|
|
|
|
plugins: [
|
|
dts()
|
|
],
|
|
}); |