Skip to content

Conversation

@rkostrzewski
Copy link
Collaborator

Webpack checks if all loaders are present so we have to pass source to proxy-loader

this.query.__proxy_loader__ = { loader: options.loader, cwd: options.cwd };

// remove proxy-loader options and make this.query act as requested loader query
swapOptions(this, options);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is clever.

}

// run loader
return loader.bind(this)(source, map);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use loader.call(this, source, map).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot how to ES5

Copy link
Member

@developit developit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amaze

@reznord reznord merged commit c706900 into master Jul 18, 2017
@reznord reznord deleted the fix/dependency-install-loader branch July 18, 2017 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants