-s tests existence and size > 0.

if [[ -s dist/index.html ]]; then echo ok; fi
bashbasics

All tips