sindresorhus/electron-reloader

Doesn't work when main entry file is in a sub-folder #7

astoilkov posted onGitHub

Our application has the following structure:

main
    main.js
renderer

Running the module from main.js doesn't start watching the renderer folder. That's because the code assumes the main.js file is in the root of the application.

Looking at the code the problem can be resolved by either watching the process.cwd() folder or creating an option for specifying which folder is the root of the app.


How about using the current path.dirname(moduleObj.filename); logic, but then also try to look up from the path to the nearest package.json (Using the find-up package) and then use that as root? As it should be the app root.

posted by sindresorhus about 6 years ago

@issuehunt has funded $60.00 to this issue.


posted by IssueHuntBot almost 6 years ago

@sindresorhus has rewarded $54.00 to @vehmloewff. See it on IssueHunt

  • :moneybag: Total deposit: $60.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $6.00
posted by issuehunt-app[bot] about 5 years ago

Fund this Issue

$60.00
Rewarded

Rewarded pull request

Recent activities

vehmloewff was rewarded by sindresorhus for sindresorhus/electron-reloader# 7
about 5 years ago