How can we work with knockout without having to compile the Magento every time?
I have disabled all cache and set Magento on developer mode but still, it needs to compile and clear cache.
I give you some tips to work with knockout js
1) Enable developer mode.
In developer mode, you need not static content deploy after Magento 2.2.
2) Check pub/static for files are symlink or not.
If files are symlink then you just need to delete a file from pub/static which you updated. After the page refresh, new updated files are automatically symlinked in pub/static.
i.e. You want to update file
Then delete this file from
If you don't want to delete the file every time from pub/static then just open the file in a new tab and just refresh file in a browser to see updated code.
i.e. To Open file from the browser go to network tab and right click on file and open in new tab and refresh new tab after changes.
For this trick, you need not flush the cache of Magento even not need to flush the cache of the browser.
3) Disable browser cache as seen as above screenshot.
4) If files are not symlinked in pub/static
Change code from direct pub/static and after final changes just copy files in the main directory. And test final changes with static content deploy.
I follow this trick for the quick update any knockout js or HTML file in Magento 2.
Hope this will help you.