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

[error] bad ES6 import paths in "modular" example code in README? #74

Open
warren-bank opened this issue Jan 15, 2020 · 1 comment
Open
Labels
bug Something isn't working

Comments

@warren-bank
Copy link

Disclaimer: I could be wrong about this, because personally.. I only use CommonJS module imports.

But.. I was looking at the README and noticed that the ES6 module import paths don't jive with the directory structure published to npm.

Specifically, every instance of:
from '@textile/ipfs-lite/

...should be replaced by:
from '@textile/ipfs-lite/dist/

..unless ES6 module imports are somehow smart enough to search paths relative to main in package.json when the verbatim path isn't found, which I highly doubt.. but can't say for sure.

@warren-bank
Copy link
Author

warren-bank commented Jan 15, 2020

from the Node.js documentation regarding its implementation of ES6 module imports

  • package.json can include an exports field containing a basepath
    • no example given for its usage

thoughts:

  • I wasn't aware that Node.js added support for ES6 modules
  • dunno if Webpack supports this exports field
  • package.json in v0.1.5 doesn't include this exports field.. so moot point (at the moment)

update:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants