-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
lessPlugins ignored, potential fix #161
Comments
@jhnns If this makes sense, or if I'm off base here but could address this some other way, please let me know -- quite happy to submit a PR if this is appropriate. |
Thx, I'll take a look in the next days. The documentation might be out of date, have to check that. |
Confirmed. The suggested fix seems to do the trick at least in fixing the error. Not sure the plugins are fed the ~ module paths correctly though. |
This should be fixed with less-loader 4. We have a test for it. We're still using |
@jhnns Well, I'd love to test it out, but at present 4.0.0 has a 'dist/cjs.js' in the package.json, which doesn't exist, so it won't run. |
@jhnns However, assuming something along the lines of index.js is what's needed there, it still won't run, and it fails with the same 'install isn't a function' error. I have no idea how your test case could be running; cloneDeep() will destroy any function present, period. |
@jhnns The same fix works in this case; in getOptions.js:
Note that I've used the old 'lessPlugins' key here, as cloneDeep() will have damaged what's in 'plugins' beyond the ability to easily use at this point. |
Original discussion on this can be found toward the end of #115.
In 3.0.0,
lessPlugins
option as documented in the README doesn't appear to actually do anything.If I instead specify less plugins in
plugins
, thecloneDeep()
call in the loader's options processing will wipe theinstall
function from each plugin, and aplugin.install is not a function
will be emitted during processing.What seems to work, assuming that lessPlugins is the desired approach, is adding this:
immediately after the line:
In the loader.
I'd guess that
cloneDeep()
might not actually be what's desired here, but this approach matches the README.The text was updated successfully, but these errors were encountered: