mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-01 06:02:34 +03:00
30 lines
607 B
TypeScript
30 lines
607 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: 'ToEverythingIndexedDBProvider',
|
|
},
|
|
rollupOptions: {
|
|
external: ['idb', 'yjs'],
|
|
},
|
|
},
|
|
plugins: [
|
|
dts({
|
|
entryRoot: resolve(__dirname, 'src'),
|
|
}),
|
|
],
|
|
});
|