Answer the question
In order to leave comments, you need to log in
How to override less styles in create react app?
Hello! At the beginning, I did the following:
1) npx create-react-app test
2) cd test
3) npm run eject
4) Additionally installed less and less-loader
5) Installed the antd library
Next, I need to customize its theme (antd) and for this I I connect the less library file
to the main index of the project file and all the windows are loaded!
Further below, I connect the file where I want to redefine the variables with colors,
but the redefinition does not occur, how can I fix it?
I used this antd/customize-theme tutorial
and so far I can only customize the theme from the webpack config:import 'antd/dist/antd.less';
import './custom-colors.less';
Answer the question
In order to leave comments, you need to log in
you need to include less in your less file
@import "~antd/dist/antd.less";
// твои переменные для переопределения
// или импорт файла с твоими переменными/стилями
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question