fix(js): respect allow-local-file-access in require
#7332
Merged
allow-local-file-access in require
#7332