felixge / felixge/node-sandboxed-module

Allow injection of modules that do not have corresponding files

Open
#64 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
343
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Hey,

In using this module was hoping to inject files that would be required dynamically, however I seem to be getting a file error when doing so.

I wrote an addition to add an option `ignoreMissing` to essentially allow the failing call to "require-like" to fail silently and fall back to the current key as the filename. Leaving the option with a default that preserves the current functionality.

I took a shot at adding a test for the option, adding "test-ignore-missing.js".

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.