Skip to content

Commit

Permalink
build(y-indexeddb): fix output package.json (#4640)
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 authored Oct 16, 2023
1 parent 579fa1a commit 1d06114
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 2 additions & 4 deletions packages/y-indexeddb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand Down
11 changes: 8 additions & 3 deletions packages/y-indexeddb/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
},
},
Expand Down

0 comments on commit 1d06114

Please sign in to comment.