Skip to content

Commit

Permalink
fix(context): Pass context to loader
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Aug 28, 2017
1 parent 4e9d34d commit 29ced70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function pitch() {
emitError: this.emitError,
emitWarning: this.emitWarning,
resolve: this.resolve,
optionsContext: this.options.context,
}, (err, r) => {
if (err) {
callback(err);
Expand Down
4 changes: 3 additions & 1 deletion src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ const queue = asyncQueue(({ id, data }, taskCallback) => {
module._compile(code, filename); // eslint-disable-line no-underscore-dangle
return module.exports;
},
options: {},
options: {
context: data.optionsContext,
},
webpack: true,
'thread-loader': true,
sourceMap: data.sourceMap,
Expand Down

0 comments on commit 29ced70

Please sign in to comment.