Forum Discussion
Djemel Guizani
Sep 02, 2016Copper Contributor
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...
- 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.
Patrick Rodgers
Microsoft
Oct 13, 2016Hello 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.