Skip to content
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

Way to rewrite import rules #64

Open
EvHaus opened this issue Apr 15, 2015 · 3 comments
Open

Way to rewrite import rules #64

EvHaus opened this issue Apr 15, 2015 · 3 comments

Comments

@EvHaus
Copy link

EvHaus commented Apr 15, 2015

We use webpack for bundling less files and webpack supports the "~" prefix for imports as a shortcut for the "node_modules" directory. Unfortunately, lesslint doesn't understand this syntax which results in the following error:

Error parsing html/less/themes/test.less: '~lesshat/build/lesshat.less' wasn't found

Is there some way to configure lesslint so that I can say something like:
{paths: {"~lesshat/build/": "./node_modules/lesshat/build/"}}

@jgable
Copy link
Owner

jgable commented Apr 15, 2015

Unfortunately, this is a parse error from the less parser itself. It's possible that we may be using an outdated less parser. What does webpack use to parse their less files and add that custom path resolution?

@EvHaus
Copy link
Author

EvHaus commented Apr 15, 2015

According to https://github.com/webpack/less-loader#imports webpack does this at run time.

@jgable
Copy link
Owner

jgable commented Apr 15, 2015

Well, that's certainly advanced. I'll have to take a look at what we can do here to support that, but it gives me hope that they documented it well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants