You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-58
Original file line number
Diff line number
Diff line change
@@ -36,20 +36,24 @@ import { get, set } from 'idb-keyval/dist/esm-compat';
36
36
37
37
### All bundles
38
38
39
-
-`dist/cjs/index.js` CommonJS module.
40
-
-`dist/cjs-compat/index.js` CommonJS module, transpiled for older browsers.
41
-
-`dist/esm/index.js` EcmaScript module.
42
-
-`dist/esm-compat/index.js` EcmaScript module, transpiled for older browsers.
43
-
-`dist/iife/index-min.js` Minified plain JS, which creates an `idbKeyval` global containing all methods.
44
-
-`dist/iife-compat/index-min.js` As above, but transpiled for older browsers.
39
+
A well-behaved bundler should automatically pick the ES module or the CJS module depending on what it supports, but if you need to force it either way:
40
+
41
+
-`idb-keyval/dist/index.js` EcmaScript module.
42
+
-`idb-keyval/dist/index.cjs` CommonJS module.
43
+
44
+
Legacy builds:
45
+
46
+
-`idb-keyval/dist/compat.js` EcmaScript module, transpiled for older browsers.
47
+
-`idb-keyval/dist/compat.cjs` CommonJS module, transpiled for older browsers.
48
+
-`idb-keyval/dist/umd.cjs` UMD module, also transpiled for older browsers.
45
49
46
50
These built versions are also available on jsDelivr, e.g.:
By default, the methods above use an IndexedDB database named `keyval-store` and an object store named `keyval`. If you want to use something different, see [custom stores](./custom-stores.md).
235
-
236
-
## Updating
237
-
238
-
### Updating from 3.x
239
-
240
-
The changes between 3.x and 5.x related to custom stores.
0 commit comments