Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iffe versions of the library are not requireable #115

Open
kije opened this issue May 21, 2021 · 1 comment · May be fixed by #116
Open

iffe versions of the library are not requireable #115

kije opened this issue May 21, 2021 · 1 comment · May be fixed by #116

Comments

@kije
Copy link

kije commented May 21, 2021

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`);
@kije kije linked a pull request May 21, 2021 that will close this issue
@papb
Copy link

papb commented Feb 6, 2022

Typo: it's iife, not iffe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants