Multiple entry points not working correctly
See original GitHub issueOur team has a config with the form:
{
...
entry: {
entry1: ['file1', 'file2'],
entry2: ['file3', 'file4'],
}
}
We were very excited to try out react-refresh-webpack-plugin
, but unfortunately, could not get it working!
Through a process of trial and error, I removed entry2
, and it started working. I think this is due to the logic in injectRefreshEntry
, which would double-append react refresh into both entries. Is this intentional behavior?
Thanks! Mike
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (8 by maintainers)
Top Results From Across the Web
Problem with multiple entry Points in the same module
The correct way is to have a single entry point per module, that sticks the appropriate widgets in the appropriate divs:
Read more >Entry points specification - Python Packaging User Guide
Entry points are a mechanism for an installed distribution to advertise components it provides to be discovered and used by other code. For...
Read more >Provide multiple entry points into an instant experience
Each instant experience has at least one entry point, which is a single activity within your app or game. If you want your...
Read more >Building an Angular Library with multiple entry points | Articles
Building an Angular Library with multiple entry points. An Angular library lets you share code between multiple projects.
Read more >Multiple entry points per page - Tooling.Report
Can multiple entry points be used without duplicating modules? ... module multiple times will introduce bugs or inefficiencies in technically correct code.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can use multiple entry points on a single page, but make sure to use
optimization.runtimeChunk: "single"
. This makes sure you only have a single runtime (with module cache) and modules are not instantiated twice.Webpack will also add the ability to create entry points that are children of other entries with
dependOn
.Anyway: Use a single webpack runtime per html page.
In case anyone is looking for a workaround for multiple entry points this worked for me: