I am currently working on integrating a new feature into my Webpack project, and I have encountered a specific issue. Within the project, there are two entry points identified as about
and feedback
.
The about
entry point imports feedback
, causing both about
and feedback
to be connected to the page. This results in the code from feedback
being duplicated.
My question is: How can I import feedback
into about
without duplicating the code? Essentially, I want Webpack to import a module from another file.
I am aware of the optimization.splitChunks
feature, but it is not suitable for my situation. I may have numerous components connected on different pages (potentially multiple at once). Consolidating them into one chunk and connecting them universally is not optimal in this case.