Description
What package is covered by this investigations?
webpack@^5
Describe the goal of the investigation
Find out how best to resolve virtual packages with different paths to the same package so that webpack can make a reference to a linked library using the DllReferencePlugin
.
Investigation report
See this bug report in webpack: webpack/webpack#10375
In a nutshell: In order for the DllReferencePlugin
to make a reference to a prebuilt bundle in a library build with webpack and DllPlugin
, the reference plugin needs to match the library package with the local package. At the moment this is doing a simple string match. This won't work for virtual packages because the paths will be different, so we'd need to do some work resolving both paths to see if they are the same yarn package. I'm guessing the logic for this is in berry, any tips on how to use would be appreciated.