-
Notifications
You must be signed in to change notification settings - Fork 20
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
@import problem #33
Comments
hey @dmeij, I think that the paths are relative, so I think that you should be using |
Unfortunately that is not possible. I work with even more files, some of which also import each other. Therefore a relative path is not possible. My example wasn't showing that, here's an updated one:
help / Form.less
dashboard / Form.less
Don't look at the content of the less files, it's just to make the problem clear. If I import the dashboard form in the help form file I have to use the root folder, same goed for the dashboard form file. So when I open the form on the dashboard everything works fine. But when I open the form from help that includes the form from the dashboard the include path is correct. But the import of the defaults.less isn't when you import the dashboard form from the help form. It would be great if you could define a base root dir (the root of the project) and use that in the @import path. So that every path can be defined from the root of the project. Is this possible? |
Hi I have the following problem with @import. I have the following directory structure:
In every View.js I import the View.less, so far so good. The Views.less files look like this:
globals/Default.less
@color_black: #424242;
dashboard/View.less
help/View.less
When I try to run this code it breaks: "TypeError: Path must be a string. Received { resolve: [Function: resolve]". It looks like the first time you import a less file the relative path is the root directory of my project. But when I import the next file "dashboard/View.less" the relative path in that file isn't the root directory anymore, but the directory it is imported from "src/modules/help/". I've tried using ./ or / in "dashboard/View.less" for the Default.less import.
I hope that i've described my problem clear enough en hope you can help me with it.
The text was updated successfully, but these errors were encountered: