-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Open
Description
Descriptions
When opening a new instance window, the module finding path used by require is changed. This happens when the opener (parent) window is in a sub-directory. For example, parent window is in public/index.html, and opened (child) window is also in that folder public/new-instance.html. Requiring same module test.js in the root directory is require('../test') for parent window, and require('./test') for child window.
This behavior is different from nw 0.8.x, only happens when new-instance attribute is set to true.
Version Effected: 0.10.1
Steps to Reproduce
- Point "main" to a sub-directory file in package.json, for example,
public/index.html - Open a new instance window within the same folder, for example,
public/new-instance.html - Require a module in parent directory, for example,
require('../test')
Expected and Got
- Expected: successfully required the module
- Got: module not found
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Reactions are currently unavailable