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
feat: inject compilerOptions into customRenderer #80
Conversation
@mrmckeb pls take a time to review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thanks @dancon - only one small suggestion, and I'll also add a little more to the docs before release.
I also wonder if you could use the customRenderer
like the below? It should work.
"options": {
"classnameTransform": "camelCase",
"customMatcher": "\\.less$",
"customRenderer": "less-plugin-aliases"
}
It depends on the way the plugin load customRenderer, and it seems not working for now, becasuse you resolve the options.customRenderer base current directory here
I make a commit to support loading npm package as customRenderer. And "options": {
"classnameTransform": "camelCase",
"customMatcher": "\\.less$",
"customRenderer": "less-plugin-aliases/lib/customRender.js"
} |
New commits happend after your first review @mrmckeb please check again: |
Hi @dancon, very sorry about the slow reply. This looks great. I'll merge today/tomorrow and add some tests for this too. I'll release by the end of the week :) |
I fix the issue#77,
I write a new npm package
less-plugin-aliases
and injectcompilerOptions
into thecustomRenderer
that I can resolve the@import ~path
manually.The general use case is as below:
ps: My english is poor, maybe there are some mistakes in README.md, pls fix it if you find ~