AFFiNE/packages/theme/vite.config.ts
2023-04-25 18:44:17 -05:00

26 lines
535 B
TypeScript

import { resolve } from 'node:path';
import { fileURLToPath } from 'url';
import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
export default defineConfig({
build: {
terserOptions: {
ecma: 2020,
},
sourcemap: true,
lib: {
entry: resolve(__dirname, 'src/index.ts'),
fileName: 'index',
name: 'ToEverythingTheme',
},
rollupOptions: {
external: ['idb', 'yjs'],
},
},
plugins: [dts()],
});