Forum Discussion
How to set a path of asset library in spfx web part?
- Jul 23, 2020
ejagmtg Use SharePoint frame work 1.4 or higher, if we do that then we can just include an option "includeClientSideAssets": true in Package-solution.json , that include all asset files with the package solution file and then you can just upload one file to the app catalog and all set with the webpart.
If you are looking for hosting your client-side web part from Microsoft 365 CDN then check below references:
- Host your client-side web part from Microsoft 365 CDN
- SharePoint Framework - Deploy SPFx WebParts To Office 365 Public CDN
Please click Mark as Best Response if my post helped you solve your issue. This will help others find the correct solution easily. It also closes the item. If the content was useful in other ways, please consider giving it Like.
- ejagmtgJul 22, 2020Copper Contributor
ganeshsanap Thanks for the response, I read both links but not able to get the settings correct. I set the path in the cdnBasePath write-manifest.json but still showing me localhost when I try to upload the package.
Thanks,
-Sal