benawad / destiny

Prettier for File Structures
MIT License
3.53k stars 80 forks source link

remote.require() #147

Closed Robertfj closed 4 years ago

Robertfj commented 4 years ago

I'm using Electron with React.

Whenever i have a remote.require(), the filepath will never get resolved, as it's really resoving it from top level main.js, and Destiny is trying to resolve it from where it's called.

would it be possible to add an exclution in the regular expression for 'remote.require' ?

Sample import:

const sshService = remote.require("./src/services/sshService.js");
AnatoleLucet commented 4 years ago

By now there's no way to do this with Destiny. But some work is in progress to resolve "non-vanilla" imports (see #123). I'll add this case to #123 to keep everything in the same place and close this issue. Thank you for pointing this out.