Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack multicompile. hot-reload doesn't work #533

Open
Mr-Grp opened this issue Jan 4, 2024 · 0 comments
Open

webpack multicompile. hot-reload doesn't work #533

Mr-Grp opened this issue Jan 4, 2024 · 0 comments

Comments

@Mr-Grp
Copy link

Mr-Grp commented Jan 4, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant