Код: Выделить всё
project2Код: Выделить всё
project3Текущая настройка < /p>
Код: Выделить всё
src/
assets/
style/
project1/ # Theme for project1
variable.less # Contains @primary-color: #123456;
project2/ # Theme for project2
variable.less # Contains @primary-color: #654321;
variable.less # Should dynamically import the correct project variables
App.tsx
App.less
vite.config.js
- Установить Vite_App_site_name = Project1 или Project2 в среде
- Когда компонент импорт/стиль/переменная. Assets/style/project1/variable.less , когда vite_app_site_name = project1
- Resolve to Assets/style/project2/variable.less when vite_app_site_name = project2
Подробнее здесь: https://stackoverflow.com/questions/795 ... t-variable
Мобильная версия