mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
build(y-indexeddb): fix output package.json (#4640)
This commit is contained in:
@@ -22,14 +22,12 @@
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.umd.cjs",
|
||||
"module": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.umd.cjs"
|
||||
"require": "./dist/index.cjs",
|
||||
"default": "./dist/index.umd.cjs"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -8,16 +8,21 @@ const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
terserOptions: {
|
||||
ecma: 2020,
|
||||
},
|
||||
minify: 'esbuild',
|
||||
sourcemap: true,
|
||||
lib: {
|
||||
entry: resolve(__dirname, 'src/index.ts'),
|
||||
fileName: 'index',
|
||||
name: 'ToEverythingIndexedDBProvider',
|
||||
formats: ['es', 'cjs', 'umd'],
|
||||
},
|
||||
rollupOptions: {
|
||||
output: {
|
||||
globals: {
|
||||
idb: 'idb',
|
||||
yjs: 'yjs',
|
||||
},
|
||||
},
|
||||
external: ['idb', 'yjs'],
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user