feature: alternate package entry points
See original GitHub issuePlease 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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Entry points specification - Python Packaging User Guide
Entry points are a mechanism for an installed distribution to advertise components it provides to be discovered and used by other code. For...
Read more >Entry points - IBM
Alternate entry points are locations, other than the primary entry, which can receive control or be referenced from another module. An alternate entry...
Read more >node.js - Package.json with multiple entrypoints - Stack Overflow
In a package's package.json file, two fields can define entry points for a package: "main" and "exports". The "main" field is supported in...
Read more >Demystefying Setuptools Entry Points - YouTube
Phoenix Zerinhttps://nz.pycon.org/schedule/presentation/180/ Entry points are one of the most powerful, yet mysterious, ways to customise the ...
Read more >Building an Angular Library with multiple entry points | Articles
A npm package can have additional entry points, called secondary entry points (or subentry points). An example is Angular Material which has ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fair enough. About
#3
though – a package author can still ship both different entry points, as well as named exports.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
@
symbol and a package name and version is derived. Then on, the package and its version is resolved from the npmjs registry. We would need to make the parser smarter about this, and instead give us the package name, import path as well as the package version.I’m open to taking PRs for this and guide you towards the changes required if your’re interested
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:
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.