Support for package.json exports
See original GitHub issueType of Issue
[ ] Bug Report
[x] Feature Request
Description
I would like to have control over what is public in my package and what isn’t. Package Exports gives us ability to define those. This should prevent library users of importing library internals.
Example of usage is here
{
"exports": {
"default": {
"import": "./fesm2015/ngx-abcd.js",
"require": "./bundles/ngx-abcd.umd.js"
},
"node": {
"import": "./fesm2015/ngx-abcd.js",
"require": "./bundles/ngx-abcd.umd.js"
}
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Modules: Packages | Node.js v19.3.0 Documentation
The "exports" provides a modern alternative to "main" allowing multiple entry points to be defined, conditional entry resolution support between environments, ...
Read more >Package exports - webpack
The exports field in the package.json of a package allows to declare which module should be used when using module requests like import...
Read more >Node.JS (New) Package.json Exports Field | by Thomas Juster
The exports field (or “export map”) provides a way to expose your package modules for different environments and JavaScript flavors WHILE ...
Read more >Exports in package.json - DEV Community
I'm a front-end developer and ship my code via npm-packages. ... I faced problems that led me to the usage of exports field...
Read more >Feature: support new package.json exports field · Issue #670
It's probably best to support it before things break. Features: Export submodules with sub-path exports;; Specific exports for both CJS and ESM modules....
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
@costlydeveloper
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
This action has been performed automatically by a bot.