Forum Discussion

Djemel Guizani's avatar
Djemel Guizani
Copper Contributor
Sep 02, 2016
Solved

PnP-JS-Core - import only a part & webpack

I am using PnP-JS-Core from a simple SharePoint page to gather data from other webs. using: import { Web } from "sp-pnp-js/lib/sharepoint/rest/webs"; I am also using WebPack to bundle the solut...
  • Patrick Rodgers's avatar
    Oct 13, 2016

    Hello Djemel,

     

    With the release of 1.0.5 this week we now support this scenario by exporting many of the objects to the root level. So if you do:

     

    import { Web } from "sp-pnp-js";

     

    let w = new Web("your full url");

     

    w.get().then(...)

     

    That should now be webpack friendly.

Resources