I've created an SPA Angular-CLI .NET Core project in Visual Studio 2017 by:
dotnet new angular -o testApp
I can build and run it normally by Ctrl-F5. In that case:
Does
webpack-dev-serverserves the app? In my opinionwebpack-dev-serveris not used here since Kestrel comes into play. However, since webpack is running under the hood there are some bundles that are being created. Here is the HTTP response:<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>angular_cli</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="favicon.ico"> <link href="styles.bundle.css" rel="stylesheet"/> </head> <body> <app-root>Loading...</app-root> <script type="text/javascript" src="inline.bundle.js"></script> <script type="text/javascript" src="polyfills.bundle.js"></script> <script type="text/javascript" src="vendor.bundle.js"></script> <script type="text/javascript" src="main.bundle.js"></script> </body> </html>The problem is I cannot find any of these bundles inside the application. Where are they? An explanation would be to exist in the memory, however that requires
webpack-dev-serverand my assumption is it is not launched! So, what exactly does it happen?By trying
ng servewhich enables the app to be served by
webpack-dev-server, I cannot communicate with .NET server part. So, what's the point of using ng serve if not being able to fully test the application including the back end part?