-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
lessc with multiple plugins #3187
Labels
Comments
Same here. My workaround is to use lessc twice - even if the output of the first call is CSS already. "scripts": {
"css": "lessc --autoprefix style.less style.css",
"css:min": "npm run css && lessc --clean-css style.css style.css",
...
} |
4 tasks
I was never able to reproduce this issue. I did however encounter a bug where those two Node.js plugins couldn't be loaded at all, so I'll make that PR and maybe you can re-check this. As far as I could tell, both plugins were only receiving their own options. |
matthew-dean
added a commit
to matthew-dean/less.js
that referenced
this issue
Jun 24, 2018
- Fixes multiple Node.js plugins not being loaded
matthew-dean
added a commit
to matthew-dean/less.js
that referenced
this issue
Jun 24, 2018
This reverts commit 6ce370d.
matthew-dean
added a commit
to matthew-dean/less.js
that referenced
this issue
Jun 26, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Trying to run lessc with two plugins -- clean-css and autoprefixer. One out of every 5-6 times I execute the compiler like so:
lessc --plugin=clean-css="level=1" --plugin=autoprefix="ie 11,Edge >= 13,Chrome >= 47,Firefox >= 45,iOS >= 9.2,Safari >= 9" input.less output.css
I get this message:
undefinedError: Error setting options on plugin index.js
unrecognised clean-css option 'ie'
It appears that clean-css is trying to read the parameters of autoprefixer. When I reverse the order I get a similar error from autoprefixer. I've tried using --autoprefix and --clean-css directly instead of --plugin to no avail. Is there some kind of trick to preventing the either plugin from being "greedy" and reading each other's parameters? Is this a plugin-specific issue?
Thanks!
The text was updated successfully, but these errors were encountered: