disable minification of cshtml (
minify: false ) otherwise you’ll have a surprise in production
I forgot to commit the minify fix. Definitely got caught by that one.
I ended up not using
RuntimeCompilation at all - you don’t need it while developing - VS will rebuild the project.
I’m sorry, but I don’t quite understand that statement.
For the production workflow I’m using a TeamCity build step which runs webpack BEFORE the core project is built. This way Index.cshtml is correct for the msbuild to pick it.
But what about at dev time? I feel like I’m not understanding something in your process (I haven’t studied your templates in depth).
What I like is the ability to use F5 to build the application, launch the web server, and still gives us HMR… all with a single key stroke. I understand the trade off is that “every change in controllers will trigger a webpack task”, but it seems like a simplified setup and dev experience compared to what you’re suggesting. Also, it seems like we’re usually either working on the front end OR the back end… it’s not often that we’re working on both at the same time. Also, HMR is pretty important for us. And don’t forget https://webpack.js.org/plugins/dll-plugin/ can be used to greatly increase the webpack compilation speed.
Let’s keep this conversation going if you don’t mind. I want to understand your perspective and definitely want to use the best setup for our needs.