Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow injection of modules that do not have corresponding files #64

Open
aetherwalker opened this issue Nov 20, 2017 · 1 comment
Open

Comments

@aetherwalker
Copy link

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".

aetherwalker added a commit to aetherwalker/node-sandboxed-module that referenced this issue Nov 20, 2017
@nomiddlename
Copy link

I'm hitting this same problem as well (I load modules dynamically based on a user's config), would love to see a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants