[Solved] error:chunkgroup.addoptions:no option merge strategy for name

“webpack”: “^ 5.72.0” error:

/Users/guojianbo/Documents/xxx/node_modules/webpack/lib/ChunkGroup.js:119
					throw new Error(
					      ^
Error: ChunkGroup.addOptions: No option merge strategy for name
    at Entrypoint.addOptions (/Users/guojianbo/Documents/xxx/node_modules/webpack/lib/ChunkGroup.js:119:12)

Solution:

webpack.config.js
before modification:

module.exports = {
	entry: {
	    'abc-def': "./src/js/abc-def.js",
	    'qwe-rty': "./src/js/qwe-rty.js",
	}
}

After modification

module.exports = {
	entry: {
	    'my-abc-def': "./src/js/abc-def.js",
	    'my-qwe-rty': "./src/js/qwe-rty.js",
	}
}

That is, add a prefix to the entry name to prevent conflicts with the internal chunk names of webpack packages

Read More: