Not able to use variable declared in less file #3689
Answered
by
matthew-dean
HenriqueAurelio
asked this question in
Q&A
-
|
Anyone knows the problem? |
Beta Was this translation helpful? Give feedback.
Answered by
matthew-dean
Jan 27, 2022
Replies: 1 comment 1 reply
-
|
In a Vue file, when you add a pre-processor, each So, you need to move this to a native Less |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
iChenLei
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



In a Vue file, when you add a pre-processor, each
<style>block is compiled independently. Same with a.lessimport into the<script>block. These are two separate rendering processes which don't know about each other.So, you need to move this to a native Less
@importin the<style>block. Some loaders also allow you to "auto-inject" an import at the head of the<style>block, I think.