mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-15 18:52:51 +03:00
fa8655e43e
it makes it perfectly clear that the package is a Node.js builtin module.
28 lines
589 B
TypeScript
28 lines
589 B
TypeScript
import { resolve } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
import { defineConfig } from 'vite';
|
|
import dts from 'vite-plugin-dts';
|
|
|
|
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
minify: 'esbuild',
|
|
sourcemap: true,
|
|
lib: {
|
|
entry: resolve(__dirname, 'src/index.ts'),
|
|
fileName: 'index',
|
|
name: 'ToEverythingIndexedDBProvider',
|
|
},
|
|
rollupOptions: {
|
|
external: ['idb', 'yjs'],
|
|
},
|
|
},
|
|
plugins: [
|
|
dts({
|
|
entryRoot: resolve(__dirname, 'src'),
|
|
}),
|
|
],
|
|
});
|