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.

[Feature] Support the `imports` field in the PnP API

See original GitHub issue
  • I’d be willing to implement this feature (contributing guide)
  • This feature is important to have in this repository; a contrib plugin wouldn’t do

Describe the user story

Node supports an imports field in package.json that the PnP API doesn’t support yet. https://nodejs.org/dist/latest-v16.x/docs/api/packages.html#imports

Describe the solution you’d like

The PnP API should be updated to support it so packages that use it can work with PnP.

Describe the drawbacks of your solution

N/A

Describe alternatives you’ve considered

N/A

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:52
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

27reactions
eladocommented, Jan 7, 2022

Some packages like chalk are now broken on PnP due to the usage of imports - https://github.com/chalk/chalk/issues/531

7reactions
soanvigcommented, Apr 18, 2022

I bump this. It looks like a serious problem. I encountered this in ava which has chalk dependency.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selective Imports - PnP/PnPjs
To solve this we introduced selective imports. This allows you to only import the parts of the sp or graph library you need,...
Read more >
PnP Specification | Yarn - Package Manager
Given a package, where are the dependencies it can access? Resolving a package import thus becomes a matter of interlacing those two operations:...
Read more >
A Complete Guide to Getting and Setting Fields Value using ...
Install the library and required dependencies npm install @pnp/sp --save For PnP js selective import, refer PnP js site.
Read more >
Writing R Extensions - The Comprehensive R Archive Network
The R function package.skeleton can help to create the structure for a new ... The ' Imports ' field lists packages whose namespaces...
Read more >
Build your first Field Customizer extension | Microsoft Learn
Notice that the base class for the Field Customizer is imported ... the SharePoint REST or CSOM API, or by using the Feature...
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