Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
Make builder accessible in plugins
Browse files Browse the repository at this point in the history
In some plugins the builder has to be accessible, for instance the WebWorker plugin.
  • Loading branch information
casperlamboo committed Jun 28, 2016
1 parent c489f2d commit f76baac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ Builder.prototype.reset = function(baseLoader) {
loader.builder = true;
// put the loader in the builder environment
loader.config({ build: true });

// make builder accessible in plugins
loader.systemJSBuilder = this;

loader.import = function(name) {
return Promise.reject(new Error('Unable to import "' + name + '".\nThe incorrect instance of System is being used to System.import.'));
Expand Down

0 comments on commit f76baac

Please sign in to comment.