jakearchibald / idb

IndexedDB, but with promises
https://www.npmjs.com/package/idb
ISC License
6.22k stars 348 forks source link

Add Conditional exports support #235

Closed Gaubee closed 2 years ago

Gaubee commented 2 years ago

see doc

jakearchibald commented 2 years ago

I don't think this is enough, as the file extensions will need to change one way or the other. See https://github.com/jakearchibald/idb-keyval/issues/126

jakearchibald commented 2 years ago

I'm going to try and fix this soon, using whatever solution I come to for idb-keyval

jakearchibald commented 2 years ago

I did this for idb-keyval in https://github.com/jakearchibald/idb-keyval/pull/129. I'm going to leave it for a few days and see if it causes problems for anyone. If not, I'll do the same for this library.

Feiyang1 commented 2 years ago

@jakearchibald any update? Love to have the exports support (especially the import condition) to make SSR easier using esm files.

jakearchibald commented 2 years ago

It's still on my radar. I'm happy with how it went with idb-keyval, so just waiting for the free time.

jakearchibald commented 2 years ago

Closing in favour of https://github.com/jakearchibald/idb/pull/242. It's also published as https://www.npmjs.com/package/idb/v/7.0.0-beta. I'd really appreciate some testing and feedback!