felixge / felixge/node-sandboxed-module

Allow injection of modules that do not have corresponding files

未关闭
#64 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
343
派生
41
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。