Why do i need to run php bin/magento setup:static-content:deploy each time i clear the cache and also running the same command is time consuming.
I enabled apache rewrite! But still why ?
In development, you don't need to run setup:static-content:deploy at all. Moreover, if you run this command you will break auto update of files on page update because deploy copies files instead of creating symlink
pub/static/frontend/<Vendor>/*
,var/view_preprocessed/*
,var/cache/*
, then set your environment todeveloper
withphp bin/magento deploy:mode:set developer
. After that Magento will create symlink as KAndy says. Sadly you have to do this each time you change a.less
file in order to regenerate compiled files. Hope this help you. When you go to production you will need to set the environment toproduction
and runsetup:static-content:deploy
.