Skip to content

Watch doesn`t work correctly with links #60

Closed

Description

@webpack-bot

Do you want to request a feature or report a bug?
Bug report.

What is the current behavior?
When i create link in node_modules and set symlinks to false, I have problem with watch, it works sometimes (more often it doesn`t work)

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

  1. create link
  2. set symlinks to false
  3. change file by link

What is the expected behavior?
Watch must work

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

node v8.9.3
npm 5.6.0
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
4.4.0-83-generic
webpack 3.10.0


This issue was moved from webpack/webpack#6122 by @sokra. Orginal issue was by @arshtepe.

@evilebottnawi I have created repo https://bitbucket.org/CyBer_UA/webpack-demo/src/344771d7d4b403eb662a9c0e7f23aaedc920f0e9?at=master
To reproduce you need:

cd repo/
npm link
cd ..
npm link simple-repo
webpack --watch

and after that you need to change file index.js in repo folder
from

import test from "src/test";

to

import test from "./src/test"; 

and after webpack do nothing...

Activity

  1. arshtepe commented on Dec 14, 2017

    @arshtepe

    I need quick workaround. How can i add to watch path to source folder ?
    I tried add path to source folder in resolve.modules, but it doesn`t work.

  2. alexander-akait commented on Dec 14, 2017

    @alexander-akait
    Member

    @arshtepe in near time i investigate this

  3. arshtepe commented on Dec 14, 2017

    @arshtepe

    I update my demo for better understanding problem.
    To reproduce you need:

    cd repo2/
    npm link
    cd ..
    cd repo/
    npm link
    npm link simple-repo2
    cd ../webpack/
    npm link simple-repo
    webpack --watch
    

    and modify something in simple-repo2
    folder webpack have link to -> repo, repo link to-> repo2.
    Maybe it helps.
    https://bitbucket.org/CyBer_UA/webpack-demo/src/a8287bb1a36e2bd91ccd55a42bfcdbb6bf0726ed?at=master

  4. arshtepe commented on Jan 9, 2018

    @arshtepe

    @evilebottnawi How's the investigation going ? Maybe, Do you need help ?

  5. alexander-akait commented on Jan 11, 2018

    @alexander-akait
    Member

    @arshtepe today i look this

  6. alexander-akait commented on Feb 28, 2018

    @alexander-akait
    Member

    @arshtepe Sorry for delay, don't have time 😞 Feel free to investigate and send PR for fix this 👍

  7. SEAPUNK commented on Mar 16, 2018

    @SEAPUNK

    I believe the solution here is to set chokidar.followSymlinks to true if webpack's resolve.symlinks is set to false: https://github.com/webpack/watchpack/blob/master/lib/DirectoryWatcher.js#L54

  8. arshtepe commented on May 23, 2018

    @arshtepe

    @SEAPUNK I tested this solution on Windows 10 and Ubuntu and it works.

  9. alexander-akait commented on Feb 19, 2019

    @alexander-akait
    Member

    @SEAPUNK can you send a PR?

  10. SEAPUNK commented on Feb 19, 2019

    @SEAPUNK

    @evilebottnawi The PR is at #72, I believe.

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