Skip to content

Support multiple rule definitions #1131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Support multiple rule definitions #1131

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 18, 2018

In my case I need to define different loader options, one for my own codes, and the other one for some third-party codes. Howerver, vue-loader repeatedly mounts __vueOptions__ to this.options and finally options get overridden. Now I pass an optionId to internal compilers to resolve the correct one.

An example is given in the test.

@yyx990803
Copy link
Member

Unfortunately I don't think the strategy of defining custom properties on this.options works anymore in webpack 4. vue-loader 14 now defines it on this._compilation, but that also causes problems when used with thread-loader or Happypack, so we are still investigating what's the best future-proof way to deal with this. Thanks for the PR anyway.

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.

1 participant