-
-
Notifications
You must be signed in to change notification settings - Fork 600
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
Add support for complex config options #348
Conversation
# Conflicts: # lib/loader.js
Current coverage is 98.37% (diff: 100%)@@ master #348 diff @@
==========================================
Files 9 10 +1
Lines 303 307 +4
Methods 41 42 +1
Messages 0 0
Branches 66 67 +1
==========================================
+ Hits 298 302 +4
Misses 5 5
Partials 0 0
|
What's the benefit over options? |
@bebraw Here is some of benefits:
Please see: https://github.com/webpack/less-loader#less-plugins |
Gotcha. Looks like a good idea then so 👍 from me. I think @sokra can comment on the code once he has some time available. |
I thought we agreed that polluting the webpack config object is not a good idea? We also recently added config object validation to webpack@2, so this will not work with webpack 2, right? |
@jhnns Ok, I guess in that case we might to remove the feature from those other loaders to keep this consistent and document how to achieve the same effect without. |
No longer allowed in webpack 2 as @jhnns said
const sharedOptions = { ... }
options: {
...sharedOptions,
key: value
} |
This PR adds ability to use use custom loader options:
Instead of #327, #315 I prefer to use recommended way to retrieve the loader config
loader-utils#getloaderconfig
.@sokra Could you please review this PR?