I recently made the transition from using gulp to webpack for our AngularJS application. While in the gulp version, I utilized the rev plugin to hash all files (css, js, and html), I am facing difficulty adding a hash to the html templates in webpack. This issue is causing problems as the browser keeps serving old html files. How can this be resolved? Below is my webpack configuration file:
const webpack = require('webpack');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
...
};
if (RemoteServer) {
console.log('running with remote server', RemoteServer);
config.devServer.proxy = {
'/occm/*': 'http://' + RemoteServer
};
}
if (isProduction) {
config.plugins.push(
new CleanWebpackPlugin(buildPath)
);
}
module.exports = config;