mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 02:13:00 +08:00
build(y-indexeddb): fix output package.json (#4640)
This commit is contained in:
@@ -22,14 +22,12 @@
|
|||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"main": "dist/index.umd.cjs",
|
|
||||||
"module": "dist/index.js",
|
|
||||||
"types": "dist/index.d.ts",
|
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"import": "./dist/index.js",
|
"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({
|
export default defineConfig({
|
||||||
build: {
|
build: {
|
||||||
terserOptions: {
|
minify: 'esbuild',
|
||||||
ecma: 2020,
|
|
||||||
},
|
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
lib: {
|
lib: {
|
||||||
entry: resolve(__dirname, 'src/index.ts'),
|
entry: resolve(__dirname, 'src/index.ts'),
|
||||||
fileName: 'index',
|
fileName: 'index',
|
||||||
name: 'ToEverythingIndexedDBProvider',
|
name: 'ToEverythingIndexedDBProvider',
|
||||||
|
formats: ['es', 'cjs', 'umd'],
|
||||||
},
|
},
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
|
output: {
|
||||||
|
globals: {
|
||||||
|
idb: 'idb',
|
||||||
|
yjs: 'yjs',
|
||||||
|
},
|
||||||
|
},
|
||||||
external: ['idb', 'yjs'],
|
external: ['idb', 'yjs'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user