The only difference is when you use html-webpack-plugin. It will inject the manifest json to you html instead of generate a json file. So you can cache the runtime file even manifest file changed everytime.
Use chunk-manifest-webpack-plugin instead if you don't need this further.
Install via npm:
npm install chunk-manifest-inject2html-webpack-plugin
Install via yarn:
yarn add chunk-manifest-inject2html-webpack-plugin
And then require and provide to webpack:
// in webpack.config.js or similar
var ChunkManifestPlugin = require('chunk-manifest-inject2html-webpack-plugin');
module.exports = {
// your config values here
plugins: [
new ChunkManifestPlugin()
]
};
Generate manifest json file or not. Default = false
Where the manifest will be exported to on bundle compilation. This will be relative to the main webpack output directory. Default = "manifest.json"
What JS variable on the client webpack should refer to when requiring chunks. Default = "webpackManifest"