I have Angular 2 and Webpack 2 starter which run on node by webpack-dev-server, and I what to run it from visual studio with web-api.
The problem is when angular2-webpa
I had the same dilemma and solved it just by using the proxy option in the webpack dev server config:
module.exports = {
devServer: {
contentBase: './dist', /* output folder */
proxy: {
'/api': { /* I had only to track calls to api, change path to one you need*/
target: 'http://localhost:15536/' /* specify your correct IIS port here */
}
}
},
/*other configurations here*/
}
After code is in place, just run the VS project and start WebPack Dev server alongside. Now all the calls from the app will be redirected to your ASP.NET server.
Let me know if any questions.