Does anyone have any experience in replacing hash with webpack? Seek guidance

  node.js, question

For example, I now have two entry files

entry:  {
 mainjs: path.join(__dirname, './mainjs'),
 maincss: path.join(__dirname, './maincss')
 bracket

Try to use the plug-in replace-webpack-plugin.

new ReplacePlugin({
 entry: './a.jsp',
 hash: '[hash]',
 output: './b.jsp'
 });

However, the hash above corresponds to a packaged hash. If I only update mainjs, in fact, the two files connected by b.jsp typed out have the latest hash.
What is your solution to this problem?
solve …

Try [chunkhash]