AFFiNE/packages/y-indexeddb/vite.config.ts

26 lines
559 B
TypeScript
Raw Normal View History

2023-04-02 10:57:50 +03:00
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: 'BlockSuiteIndexedDBProvider',
},
rollupOptions: {
external: ['idb', '@blocksuite/store'],
},
},
plugins: [dts()],
});