2023-10-17 03:47:05 +03:00
|
|
|
import { resolve } from 'node:path';
|
2024-01-19 06:47:08 +03:00
|
|
|
import { fileURLToPath } from 'node:url';
|
2023-10-17 03:47:05 +03:00
|
|
|
|
|
|
|
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'),
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
});
|