I am using VS2017/2019 and .NET Core 2.1 as to create Angular or React applications. Angular-CLI or create-react-app is used for setting everything up. All the following has to do with development stage:
When we build our .NET project, an IIS express server is launched as to accommodate our application, let's name it localhost:19500.
At the same time when the front-end part is being launched (either Angular or React) a Webpack Dev server is launched as well, that accommodates the front-end compiled code in bundles created by Webpack; we can see that by examining (via Chrome Dev Tools) index.html which includes these bundles. As to fully understand that, these bundles are not physically located anywhere; they are loaded in memory and are accessible via Webpack Dev Server. If we run the front-end app independently, we can access this Dev server by localhost:4200 (Angular) or localhost:3000 (React). So, my question is:
Is my above analysis correct? If we launch IIS server, is there any Webpack Dev Server which serves the front-end or the former one serves the front-end bundles?
If there is a Webpack Dev server, then we have two servers and we should solve CORS issues. If there is not, how IIS takes care of issues like Hot Module Replacement(HMR)? What's the exact role of middleware UseAngularCliServer?
