Overview
Please refer to my previous article, Develop First Client-Side Web Part, to get started, develop the first SPFx client-side web part, and test it on a local SharePoint workbench.
In the production-ready scenario, the web parts can be deployed to any of the below,
- Azure CDN (Previous article)
- Office 365 Public CDN (Previous article)
- SharePoint Library in your tenant (This article)
In this article, we will explore the option of deploying the SPFx web parts using the SharePoint library.
Deployment to CDN
The build output of the SPFx client-side web part consists of a solution package (.sppkg file) and various scripts, CSS, and other assets. The sppkg file is deployed to SharePoint which includes a manifest with a URL pointing to the location where script files are deployed. The script files should exist at the location specified in the manifest file, otherwise, the web part will not work in SharePoint.
These files usually get deployed to a CDN location. CDN location could be Azure BLOB storage or Office 365 public CDN. We can use any of these CDN locations, however, using CDN is not a must. SharePoint Framework does not impose any restrictions that scripts should be deployed to any CDN. You can upload the scripts anywhere from where they can be accessed. That means you can even upload the scripts to a SharePoint library inside your tenant to which everyone has access. SharePoint Framework client web part can access the scripts from the SharePoint library.
In short, scripts can be deployed to any location including Azure BLOB storage, Office 365 CDN, any document library in SharePoint, or even a physical web server from where it can be accessed. However, each of these approaches has its own pros and cons with regard to cost, performance, and scalability.
If the organization has its users worldwide across different geo-locations, having a CDN will help to serve as a central repository.
In package-solution.json, specifying includeClientSideAssets as true will include the assets in .sppkg file. After deploying the sppkg solution to the app catalog, SharePoint will unpack the assets to a predefined location in the tenant.
Create SharePoint Library as CDN
- Open SharePoint Site.
- Click "Settings" (gear icon) > "Add an App".

- Click the "Document Library" tile.
- Give it a name - SPFxDeploy.
- Click (gear icon) > "Library settings".
- Under “Permissions and Management”, click “Permissions for this document library”.
- Give read permission to all users (use every user).







Suryanarayana ThurangiPosted Nov 13, 2025, 3:05 AM
We currently have several classic web parts developed using JSOM and custom HTML/CSS for UI/UX, leveraging Bootstrap for styling. As Microsoft is deprecating the use of custom scripts, we plan to migrate these classic web parts to modern SPFx-based web parts.In this modernization process, we intend to include external libraries such as agGrid and Metro UI. However, embedding or referencing their CDN links individually within each SPFx web part is neither efficient nor a recommended best practice? To optimize maintainability and performance, we are exploring the possibility of hosting these CDN assets centrally — for instance, within a single site collection — and referencing them across multiple SPFx web parts or solutions. Could you please provide few suggestions?
shaePosted Oct 13, 2024, 6:53 AM
Can this be used for SharePoint server 2019? I am currently facing an issue where I am unable to add .sppkg webpart to SharePoint on prem 2019 site
prathyusha kPosted Jun 17, 2020, 10:20 AM
Thanks this was helpful. Can we not hardcode the sitecollection url when not using CDN. So that these files go to the site where app is installed
Lakshmi PriyaPosted Apr 23, 2020, 3:02 PM
Thank you for sharing this information
prafulla patilPosted Jul 1, 2019, 4:55 AM
Thanks Nanddeep for article
Piyush AgarwalPosted Oct 5, 2018, 12:02 PM
Great Information....
Nilesh UbhePosted Aug 3, 2018, 1:20 AM
Awesome info....