Installing JavaScript and CSS libraries
To start a project, we can use a template from Visual Studio to easily create a proof of concept (POC), demo, or base project, but there is a probability of the project growing in functionalities and services. In this scenario, we will have to include libraries to potentialize and optimize our project and extend the functions incorporated in the base template.
To include a new JavaScript library in our SPAProject, you can open Solution Explorer and right-click on the ClientApp
folder. In the menu, you will find the Client-Side Library… option (see Figure 8.8):
After clicking on this option, you will get a modal that allows you to include web libraries from different resources. By default, cdnjs is selected, but you can also choose the other sources supported by Visual Studio: