2

I have upgraded my SharePoint Framework Packages to the latest. In WebPart solution updated cdnBasePath (write-manifest.json) to a SharePoint library path. After I ran the command "gulp build --ship" the internalModuleBaseUrls is updated to the bundled JS file in the deploy folder. After ran the "gulp Package-Solution" and it generated "<>.sppkg" file, if I see the internalModuleBaseUrls in the Package web part XML (Webpart_<>.xml) file still referring "localhost:4321" path. Hence, the WebPart is unable to render on SharePoint pages as the resources files trying to downloading from the localhost.

As per my observation the SPFx new build updated the the build module packages in the packages.json

"@microsoft/sp-build-web": "~1.0.1"

I am thinking this might be causing issue.

Is anyone come across this issue? Can you please help. Thanks in advance.

1 Answer 1

3

I am able to find an answer for this issue. The following commands order helped to resolve.

gulp clean
gulp bundle --ship
gulp package-solution --ship

If I skip the "--ship" option to command it is generating resources and package with local site path.

It might helpful if anyone running with same issue.

Your Answer

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

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