iffe versions of the library are not requireable
kije opened this issue · comments
This package specifies the "exports" key in it's package.json, which specifies the pattern "./dist/*": "./dist/*/index.js"
However, this prevents the iffe
versions (dist/iffe/
and dist/iife-compat/
) of the library from being required, since those only have a index-min.js
file.
Altough it's rare that one would use those files in the context of a module import (require()
or es-module import import ... from 'idb-keyval/dist/iife'
) there might be cases where someone wants to resolve the path to the file using require.resolve
, e.g. to later copy the file to some other location.
So this code won't work:
const idbKeyvalSource = require.resolve(`idb-keyval/dist/iife/index-min.js`);
Typo: it's iife
, not iffe