You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.
In this scenario, hot-client is applying the client entry to each of the entries listed here. In a multi-page scenario, where only one entry per page is being loaded, this is acceptable. In a MultiCompiler scenario this is acceptable.
Actual Behavior
In a scenario where html-webpack-plugin is being used to combine all entries into a single html file for single-page applications, this will cause unwanted side effects:
The client entries is applied to all entry compilations, resulting in each entry script on the same page vying for control of the page.
Multiple client WebSockets will be created on the same page.
For Bugs; How can we reproduce the behavior?
For Features; What is the motivation and/or use-case for the feature?
We need some kind of mechanism to combat this and configure things correctly for each scenario. There are also going to be exceptions, where for some reason someone will want what is normally incorrect behavior. We also need to be opinionated on what the default behavior is.
This will be a breaking change.
Default
The client entry should only be added to the first config entry of any type of compilation - single or multi.
For a MultiCompiler config the client should only be added to the first entry of the first compilation config. Not sure in which scenarios this is needed.
Introduce autoEntry: false option to disable automatic injection of the client and HotModuleReplacementPlugin so users can manually configure their compilers as needed.
The text was updated successfully, but these errors were encountered:
Code
Expected Behavior
In this scenario, hot-client is applying the
client
entry to each of the entries listed here. In a multi-page scenario, where only one entry per page is being loaded, this is acceptable. In a MultiCompiler scenario this is acceptable.Actual Behavior
In a scenario where html-webpack-plugin is being used to combine all entries into a single html file for single-page applications, this will cause unwanted side effects:
client
entries is applied to all entry compilations, resulting in each entry script on the same page vying for control of the page.For Bugs; How can we reproduce the behavior?
For Features; What is the motivation and/or use-case for the feature?
We need some kind of mechanism to combat this and configure things correctly for each scenario. There are also going to be exceptions, where for some reason someone will want what is normally incorrect behavior. We also need to be opinionated on what the default behavior is.
This will be a breaking change.
Default
The
client
entry should only be added to the first config entry of any type of compilation - single or multi.For a MultiCompiler config theNot sure in which scenarios this is needed.client
should only be added to the first entry of the first compilation config.Introduce
autoEntry: false
option to disable automatic injection of theclient
andHotModuleReplacementPlugin
so users can manually configure their compilers as needed.The text was updated successfully, but these errors were encountered: