question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When a Yarn 2 installation uses virtual packages, the DllPlugin/DllReferencePlugin doesn't refer to the linked library.

See original GitHub issue

When 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-lib bundles react-dom and creates a library-manifest.json using the DllPlugin.
  • lib-user references library-manifest.json using DllReferencePlugin.

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:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
alexander-akaitcommented, May 14, 2020

bump

1reaction
vankopcommented, Sep 15, 2021

@sokra is it still an issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

yarn link
This command is run in the package folder you'd like to consume. For example if you are working on react and would like...
Read more >
Yarn vs NPM: A Comprehensive Comparison - phoenixNAP
Yarn and NPM are two of the most popular Node.js package managers. They allow downloading, installing, and managing packages when developing ...
Read more >
How To Install and Use the Yarn Package Manager for Node.js
It was originally created to address some issues with the popular NPM package manager. Though the two package managers have since converged in ......
Read more >
4 Methods for How to Install Yarn on Windows Server
Now, run the following Yarn version check command on the Windows PowerShell to verify the completion of the Yarn package install. yarn --version....
Read more >
yarn: cannot find module - typescript - Stack Overflow
This page intends to be a collection of settings for each editor we've worked with - please contribute to this list! For example...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found