question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[core] Add `exports` to the package.json

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡

An exports property in the package.json of @material-ui/icons (and other packages), to aid discovery of the officially exported modules. To support CDNs such as https://jspm.org/

Examples 🌈

"exports": { "./*": "./*.js" }

Motivation 🔦

I want to consume material-ui via the JSPM CDN, but due to a lack of exports, it has to work out for itself what modules should be exported, and some icons are missing.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jollytoadcommented, Jul 28, 2021

Ok, finally got our app updated to MUI 5.0.0-beta.2 - would the core MUI team still be receptive to have exports added to the package.json files, so that the future CDN based systems (JSPM/Skypack etc) can make use of this to know what modules are officially exported from MUI packages?

0reactions
eps1loncommented, Jul 29, 2021

would the core MUI team still be receptive to have exports added to the package.json files,

Nothing has changed about that. Be aware that a "exports": { "./*": "./*.js" } does not work for us: https://github.com/mui-org/material-ui/pull/26264#issuecomment-843095408

Read more comments on GitHub >

github_iconTop Results From Across the Web

[core] Add `exports` to the package.json · Issue #26254 - GitHub
I want to consume material-ui via the JSPM CDN, but due to a lack of exports, it has to work out for itself...
Read more >
Exports in package.json - DEV Community ‍ ‍
I'm a front-end developer and ship my code via npm-packages. ... @some/vendors/index.ts export { createStore } from '@reatom/core'; ...
Read more >
Modules: Packages | Node.js v19.3.0 Documentation
Existing packages introducing the "exports" field will prevent consumers of the package from using any entry points that are not defined, including the...
Read more >
package.json - npm Docs
json are the name and version fields as they will be required. The name and version together form an identifier that is assumed...
Read more >
Node: Exports field in package.json is not working
I couldn't get exports to work. This is how I worked around it. I had to change the build + publish only the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found