'Webpack doesn't pick up local node_modules updates

I have a package A that depends on package B. I am using yalc to update B and publish changes locally so that A can pick up these changes.

I can see that the changes are copied into A's node_modules folder, however webpack doesn't seem to pick them up. When running A in a dev server, I still see the old code. Restarting the dev server doesn't help. Even yarn install --check-files doesn't help. The only thing that helps is nuking the whole node_modules and reinstalling.

Project A was creates with create-react-app

package.json has the following:

dependencies: {
...
@company_name/project_name: "file:.yalc@company_name/project_name"
... }

I am using yarn 1.22



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source