Let's say you use Webpack
for front end bundling. You can add webpack-dev-middleware
to serve your statics through tiny and fast server. It allows you to automatically reload your assets when content has changed, serve statics in memory without continuously writing intermediate versions on disk.
Install-Package Microsoft.AspNetCore.SpaServices
npm install --save-dev aspnet-webpack, webpack-dev-middleware, webpack-dev-server
Extend Configure
method in your Startup
class
if (env.IsDevelopment())
{
app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions()
{
ConfigFile = "webpack.config.js" //this is defualt value
});
}