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

modernise dist folder & bundle adaptors with treeshaking #751

Closed
mesqueeb opened this issue Mar 20, 2019 · 3 comments
Closed

modernise dist folder & bundle adaptors with treeshaking #751

mesqueeb opened this issue Mar 20, 2019 · 3 comments
Labels

Comments

@mesqueeb
Copy link

mesqueeb commented Mar 20, 2019

I was confused about how to import adaptors until I saw this thread:
#568

I am under the impression that we could improve the way to import adaptors to support a syntax similar to:

import { indexedAdapter } from 'lokijs'

When we provide separate package.json entry points with eg. main and module fields, we could use something like Rollup to easily provide a CommonJS distribution script for main which will work in NodeJS environments and provide the ESM (ES module) distribution script for module for browsers and bundlers like Webpack and Rollup.

Bundlers would treeshake the main lib to only take out the adaptor in case the import method like above is used.

@stale
Copy link

stale bot commented May 19, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 19, 2019
@mesqueeb
Copy link
Author

+1 😄

@stale stale bot removed the wontfix label May 19, 2019
@stale
Copy link

stale bot commented Jul 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 18, 2019
@stale stale bot closed this as completed Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant