asar-require-auto (a Node Package)
This package will try to load asar file first.
It fix package asar-require cannot load asar package like...
; // if you do thisconst foo = ; // will ok // but thisconst foo = ; // will throw error
Install
npm install asar-require-auto
Usage
Just require it and use like normal require()
.
// require the packageconst asarRequireAuto = ; // If "./name_of_some_module.asar" exist, it will load it first!// Other case it will load "./name_of_some_module" like normal.const some_module = ;
It will also read package.json
file and load the script where in main
field.