webpack multicompile. hot-reload doesn't work
Mr-Grp opened this issue · 0 comments
Mr-Grp commented
I use webpack to multi-compile modules, with support for hot updates. like this:
// webpack.config.js
const config = [
{
name: 'C1',
entry: './src/C1.js',
plugins: [new PreactRefreshPlugin()],
output: {
}
},
{
name: 'C2',
entry: './src/C2.js',
plugins: [new PreactRefreshPlugin()],
output: {
}
}
];
// ......
webpack(config)
As a result, the final page will have two compiled artifacts, each containing hot update related code, but it is not working properly. I feel that this may be due to different artifacts sharing the same variable(self.xxx).