Skip to content

Watching symlinked dependencies does not work when resolve.symlinks is set to false #12810

Closed

Description

@rpokorny

Bug report

What is the current behavior?
When a webpack configuration includes resolve: { symlinks: false }, dependencies that are linked into the node_modules folder as symlinks do not get watched properly by webpack-dev-server: changes to those dependencies do not trigger a rebuild or browser refresh.

It is my understanding that using the resolve.symlinks property in this way is valid and shouldn't cause this issue. In the real application where this was discovered, we are using resolve.symlinks to avoid errors resulting from the symlinked module pulling in duplicate copies of other dependencies (React specifically).

If the current behavior is a bug, please provide the steps to reproduce.

Please see https://github.com/rpokorny/webpack-link-bug for a reproduction of the issue.

What is the expected behavior?
When a file in the symlinked dependency is modified, the change should automatically get picked up resulting in a rebuild of the bundle and a refresh of the webpage if it is open in a browser.

Other relevant information:
webpack version: 5.24.3
Node.js version: 12.18.0
Operating System: Linux 5.10.14-arch1-1
Additional tools: webpack-dev-server 3.11.2

Activity

  1. webpack-bot commented on Mar 4, 2021

    @webpack-bot
    Contributor

    For maintainers only:

    • webpack-4
    • webpack-5
    • bug
    • critical-bug
    • enhancement
    • documentation
    • performance
    • dependencies
    • question
  2. rpokorny commented on Mar 4, 2021

    @rpokorny
    Author

    The workaround described at #11612 (comment) does fix the issue, but it sounds like that is not recommended for performance reasons.

  3. alexander-akait commented on Mar 5, 2021

    @alexander-akait
    Member

    Yep, bug, duplicate of #12246

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions