I need to create a simple app using Sharepoint Framework - app will generate iframe with body taken from external vendor. Normally in regular HTML website I would just put tag in the head section but here I just put this script code in the render method in TS file of this new module. Anyway, locally it works absolutely fine, works as expected.

Then it came to bundle it to a single piece. I ran gulp bundle and gulp package-solution to build the app.

Now when my Client tries to upload the app by uploading JS file, he see reference to localhost:4321 and entire upload crashes:

Failed to load URL 'https://localhost:4321/lib/webparts...'

I see this has something to do with manifest file but what exactly I should change over there? Does it mean I have to upload it to CDN or what (or maybe another free of charge source)? I thought once it's build it's fully independent as everything needed is inside single file - and that's why you want to upload it - to make it working from this source.

Sorry if this is dummy question but never played with SF before

2 Answers 2


You need to run gulp bundle and gulp package-solution with --ship flag to get a production version of the package.

gulp bundle --ship

gulp package-solution --ship


You can deploy to a document library, you can check the demo shared by Nanddeep Nachan.

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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