I have created a MVC (aspnet core) application that uses Angular2 for the front end.
A shortened version of my solution looks like this:
Solution
- wwwroot (webpack bundled angular)
|_ app.bundle.js (bundle)
- app (angular 2 application)
|_ Components
|_ app.module.ts
|_ main.ts
- Controllers
|_ HomeController.cs
-Views
|_Home
-|_Index.cshtml
-webpack.config.js
-Startup.cs
-project.json
-package.json
-web.config
My problem is when it comes to debugging and running the site.
I am using IIS express to debug the site. It works, but debugging requires digging into an enormous webpack created app.bundle.js. (I'm not sure how to use the map files either. Chrome doesnt seem to unpack them.)
Most of the documents I've read on debugging call for the use of npm start or webpack-dev-server. I do not think I can use these because my site requires the cshtml to be served.
I would also like to get to a place where I can use watch to automatically compile and refresh my site.
Can I set up IIS (instead of express) to serve both cshtml and angular 2 files and debug them easily? (preferably with something that handles updates like watch)