In custom theme i have create file custom.less after Flush JavaScript/CSS Cache and Fersesh cache it compiling .less files to CSS. but after i change file custom.less this file not update. i tried set Client-side LESS compilation it not luck. So anysuggestion? Many thanks.
2 Answers
Try to re-deploy by command. Even if you are running in production mode
php bin/magento setup:static-content:deploy
Or you can do it manually by clear asserts and static files in
pub/static/frontend/[Vendor]/[YourTheme]/en_US/css
var/cache
var/view_preprocessed/css/frontend/[Vendor]/[YourTheme]/en_US/css
-
Thanks @mrtuvn so if i change custom.less i repear this. I want it automatic update when i change file less.– xankaMar 21, 2016 at 4:58
-
2I think it still bug in m2. Tested in apache 2.4.7 linux no symlink. I already delete less in pub/static in developer mode but magento not re-generate it again. Only re-gen in command way. Same problem with javascript files– mrtuvnMar 21, 2016 at 7:59
Follow below steps:-
Just add new custom file here
app\design\frontend\Vendor\Themename\web\css\source\_custom.less
and import this file in source file given path below
app\design\frontend\Vendor\Themename\web\css\source\_sources.less
import your file
(if there is not available _source.less file in your theme then go to vendor\magento\theme-frontend-blank\web\css\source
folder and copy file in your custom theme)
@import '_custom.less';
- clear cache
- php bin/magento setup:static-content:deploy
and your _custom.less
changes will compiling with your theme .less
files.
-
2