Compiling web libraries with Web Compiler
If you are using TypeScript, LESS, or Sass in a project, you need to pre-compile the code to get the production version of your web project so that your browser can read every line of code. Note that your browser can only read CSS, HTML, and JavaScript. Using Web Compiler by Jason Moore in VS, you can do this easily and see the precompiled code directly.
Now that we know what Web Compiler is, let’s install it and understand how to take advantage of this tool.
To install Web Compiler, go to Extensions | Manage Extensions, type web compiler
in the search bar, and install the Web Compiler 2022+ extension, as shown in Chapter 11, Working with Extensions in Visual Studio.
To use Web Compiler, we can navigate to and select any JavaScript file in any project and then right-click it. This will display the Compile file option in the menu, as shown in Figure 12.8:
Figure 12.8 – The "Web Compiler...