Forum Discussion

Joseph Ackerman's avatar
Joseph Ackerman
Iron Contributor
Jun 14, 2017

Debugging SPFx App Customizer

I have had great success debugging SPFx web parts using the Chrome extension. Is there a way to get this to work with the framework extensions? I'm trying to build an Application Customizer that buil...
  • Joseph Ackerman's avatar
    Joseph Ackerman
    Jun 19, 2017

    Pieter Veenstra,

     

    Apparently there are some additional instuctions required for the PnP JS and SPFx to play nicely with one another.  Thanks to Patrick Rodgers for pointing me to the missing key described in Using sp pnp js in SharePoint Framework - Establish Context.

     

    A single call in the onInit() method override does the trick:

    @override
      public onInit(): Promise<void> {
        return super.onInit().then(_ => {
          
          //--- ensure that the current web is used for all pnp calls
          pnp.setup({
            spfxContext: this.context
          });
    
        });
      }

    The REST call is now forming properly. It sure would be nice to have complete, organized documentation all together in ONE PLACE. :)

     

    Thanks again for your interest and assistance.

Resources