[2.0] How do you import relative less files?
See original GitHub issueVersions:
"umi": "^2.0.1",
"umi-plugin-react": "^1.0.1"
I’ve looked at #2346 and #2432 and #2306 and it still doesn’t work.
I’m importing from:
app/src/components/Foo/Bar/index.less
I’m trying to import:
app/src/variables.less
I’ve tried:
@import '../../../variables.less';
@import '/variables.less';
@import '/src/variables.less';
@import '~/variables.less';
@import '~variables.less';
@import '~@/variables.less';
@import '~@variables.less';
I also tried to change the varFile
in https://github.com/ant-design/ant-design-pro/blob/master/config/plugin.config.js to the ../src/variables.less
and that didn’t work either.
Nothing works. How do I fix this?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
LESS importing CSS and relative paths - Stack Overflow
css has a relative path to images as "../img" so when I minify all these files and dump my output file, it no...
Read more >Command Line Usage - Less CSS
This option allows you to rewrite URLs in imported files so that the URL is always relative to the base file that has...
Read more >Using relative paths in LESS files [#3077427] | Drupal.org
My style uses a relative path to link fonts. ... The url root to prepend to any relative image or @import urls in...
Read more >Issue with absolute path for Less files #2306 - GitHub
Hi all, I have issues importing a less file into another one from the same folder. ... [2.0] How do you import relative...
Read more >LESS - Quick Guide - Tutorialspoint
Open this HTML file in a browser, the following output will get displayed. Less Importing. LESS - Variables. In this chapter, we will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Then why do we use
plugin.config.js
file. Let’s remove it permanently.work