0

Love the new SPFx capabilities. Just set up my dev environment, started gulp serve, and HelloWorld rendered on the localhost workbench. Made a code change, saved the file, gulp serve re-published the project and pushed the same changes up to my online development site. Re-added the web part and voila, they are the same in both places.

Can anyone explain HOW gulp "knows" which online tenant I'm using for development? I don't think I ever told it. I'm using two different login identities -- one for my domain-based PC and the other in O365.

How is the "link" between my local dev environment and my target tenant established and maintained?

  • Are you saying that you are seeing the change on workbench.aspx? – Christophe Nov 2 '16 at 3:10
2

I am assuming that by "online development site" you mean the workbench.aspx page on your dev tenant.

The change is not pushed online. Your workbench.aspx page is actually talking to your localhost server (started by gulp serve which runs gulp Connect) and pulling the Web Part from your computer.

  • Right - as Christophe says, it's not gulp talking to the workbench, but rather the workbench requesting files from your local host. When you run gulp serve on your dev box, a local webserver spins up and serves the files from port 5432 by default (configured in your config/serve.json file). If you look at a network trace (or the network tab in the debugging tools of your browser) you will see both your local workbench and the sharepoint hosted workbench requesting the various files to run your webpart. – PatMill_MSFT Nov 2 '16 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.