-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
feature: alternate package entry points #218
Comments
While I agree that this is a problem, I don't see too many packages doing this. Did you check out the new Exports analysis feature launched in Bundlephobia? I think more package authors are moving in the direction of exporting these as ES6 named modules from the default entry point. Case in point the examples you listed above (scroll down to find the https://bundlephobia.com/result?p=lodash-es@4.17.15 |
@pastelsky I had not seen the new exports analysis feature! That's very cool!! This being said, the feature looks (almost) unrelated to this request. There are some packages which export everything from the main entry point, in addition to utilizing (somewhat redundant) alternate entry points. For example, Rxjs, however, does not do this. For example, the export analysis for rxjs does not contain any of the exports from It's possible I feel the need for this feature more because it's something I run into frequently using Angular, which has many packages utilizing alternate entry points. A few additional angular examples:
A few reasons for using alternate entry points
While reason |
Fair enough. About Good news is, bundlephobia's core already supports something like this. For the most part things will just work. The part that is going to fail right now is parsing or package strings. Today a string like
will simply be split at the I'm open to taking PRs for this and guide you towards the changes required if your're interested |
Awesome 👍 . This probably isn't something I'm interested in working on, but perhaps in the future that'll change. |
Would be really neat to see this added. We're adding a new "RTK Query" API in Redux Toolkit 1.6. The import entry points will be: // Existing UI-agnostic APIs
import { createSlice } from "@reduxjs/toolkit";
// RTKQ features, UI-agnostic
import { createApi as genericCreateApi } from "@reduxjs/toolkit/query";
// RTKQ features, with React-specific functionality baked in
import { createApi as reactCreateApi } from "@reduxjs/toolkit/query/react"; The RTK Query entry points will add an additional size chunk to a user's app, and it would be nice to show and distinguish that from the contents of the root entry point. |
Please describe the feature/suggestion
Many packages offer alternate entry points (e.g.
lodash-es/map
,rxjs/operators
,@rschedule/core/rules
, etc). At the moment, it appears that bundlephobia only supports scanning they main entry point of a package (e.g.rxjs
).It would be awesome if, when searching for packages on
bundlephobia.com
, there was a way of specifying that an alternate entry point should be used. E.g.rxjs/operators@6.5.3
The text was updated successfully, but these errors were encountered: