Skip to content

Watching __dirname and not what I set path to #61

@jletey

Description

@jletey

What is the problem

When I set the path to watch as a different path other than __dirname, it doesn't seem to work ... what I mean is that it seems to watch changes only in __dirname, and not the path that I specified

How to reproduce

  • Clone blocks/desktop
  • yarn
  • yarn add -D electron-reload
  • Add this code to main/index.js:
require('electron-reload')(path.join(__dirname, '..', 'src'), {
  electron: path.join(__dirname, '..', 'node_modules', '.bin', 'electron')
})
  • yarn start
  • Change line 83 in src/index.js to:
- <span sx={{ ml: 2 }}>Back</span>
+ <span sx={{ ml: 2 }}>Testing</span>
  • Navigate to some MD or MDX file in your filesystem
  • It will show up as <- Back and not as <- Testing! For example:
Before After

Additional information

OS: macOS 10.14.4 (18E226) ... Mojave
node: 10.15.2
yarn: 1.15.2
electron: 5.0.7

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions