Kestrel Test from Visual Studio

The Kestrel Test can be also performed within the Visual Studio development environment: to do so we have to change the active running profile from IISExpress to TestMakerFree: such task can be easily done within the Visual Studio GUI by left-clicking to the right handle of the Select Startup Item button:

The settings for all the profiles listed there can be customized by editing the launchSettings.json file within the Properties solution folder. Being able to test the Production profile within Visual Studio can be very useful to successfully debug some specific angular issues, such as those related to AoT compilation and/or server-side prerendering: we just have to configure our project's appsettings.json file(s) accordingly and ensure that Webpack will build our app client and vendor files in Production mode. Doing that is just as easy as executing a couple command-line instructions from the project's root folder:

> node node_modules/webpack/bin/webpack.js --env.prod

> node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod

The first one will rebuild the client bundle, while the latter will take care of the vendor bundle.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.227.4