When a Yarn 2 installation uses virtual packages, the DllPlugin/DllReferencePlugin doesn't refer to the linked library.
See original GitHub issueWhen a Yarn 2 installation uses virtual packages, the DllPlugin/DllReferencePlugin don’t pull in the linked library. This is because the virtual package paths are unique even though the refer to the same package.
Bug report
See this repo for a demonstration. It contains 2 webpack builds: dll-lib and lib-user.
dll-libbundlesreact-domand creates alibrary-manifest.jsonusing theDllPlugin.lib-userreferenceslibrary-manifest.jsonusingDllReferencePlugin.
What is the current behavior?
react-dom is bundled into lib-user/dist/index.js.
If the current behavior is a bug, please provide the steps to reproduce.
https://github.com/ahum/webpack-dll-yarn-two-virtual-paths-demo
What is the expected behavior?
The bundle in lib-user makes a reference to react-dom in it’s bundle by using library-manifest.json in dll-lib.
Other relevant information: webpack version: 5.0.0-beta.13 Node.js version: 11.10.0 Operating System: Pop_OS! 19.10 Additional tools:
- yarn@2.0.0-rc.29
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:5 (4 by maintainers)

Top Related StackOverflow Question
bump
@sokra is it still an issue?