spfxdeployement

Title: Build and Deployment of SFX


Step: Run below command. this command is used to bundle all typescript files and node_module dependents into a single js file

>gulp bundle --ship
Upload below Files in CDN location where configured CDN.



Step2:
Case: Make sure to give includeClientSideAssets as true in package-solution.json, it helps use Office 365 CDN.

Case 2: Azure CDN:  if you are using Azure CDN, Make sure to give includeClientSideAssets as false in package-solution.json so that client-side files not packaged in .sppkg file.

generate  .sppkg file using below command

>gulp package-solution --ship 
file will generate in below location




Step3: upload .sppkg file into appcatalog site and active. tip: you will have to create appcatalog site if not exist,
Note: if you are using azure CDN. it should show AZure url while activate.
you should access appcatalog site in order to upload .sppkg file.
Go to Site Settings and click on Site Content. Find the app ad click on ... dots and Click on about and click on Get it.

Step4: go to  modern page and add webpart.
Note: if you want to adde the webpart in classic page. go to webpart and go to another option and find the spfx webpart.