File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const vm = require('vm');
44
55function RequireJsResolverPlugin ( options ) {
66 this . configPath = options . configPath ;
7+ this . sandbox = options . sandbox || { } ;
78}
89
910RequireJsResolverPlugin . prototype . getConfig = function ( fs ) {
@@ -24,11 +25,11 @@ RequireJsResolverPlugin.prototype.getConfig = function(fs) {
2425 return this . configData ;
2526 }
2627
27- var sandbox = {
28+ let sandbox = Object . assign ( {
2829 paths : { } ,
2930 require : function ( ) {
3031 } ,
31- } ;
32+ } , this . sandbox ) ;
3233 sandbox . require . addPaths = function ( paths ) {
3334 for ( var path in paths ) {
3435 sandbox . paths [ path ] = paths [ path ] ;
@@ -65,7 +66,9 @@ RequireJsResolverPlugin.prototype.apply = function(resolver) {
6566 } else {
6667 callback ( ) ;
6768 }
68- } )
69+ } , err => {
70+ callback ( err ) ;
71+ } ) ;
6972 } ) ;
7073} ;
7174
You can’t perform that action at this time.
0 commit comments