We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 251a9e7 commit 69bc18dCopy full SHA for 69bc18d
index.js
@@ -4,6 +4,7 @@ const vm = require('vm');
4
5
function RequireJsResolverPlugin(options) {
6
this.configPath = options.configPath;
7
+ this.sandbox = options.sandbox || {};
8
}
9
10
RequireJsResolverPlugin.prototype.getConfig = function(fs) {
@@ -24,11 +25,11 @@ RequireJsResolverPlugin.prototype.getConfig = function(fs) {
24
25
return this.configData;
26
27
- var sandbox = {
28
+ let sandbox = Object.assign({
29
paths: {},
30
require: function() {
31
},
- };
32
+ }, this.sandbox);
33
sandbox.require.addPaths = function(paths) {
34
for (var path in paths) {
35
sandbox.paths[path] = paths[path];
0 commit comments