Ionic serve locks index.html

Im fiddling with the build process and what I’m doing is generating the index.html from a template file (using gulp-inject) so I don’t have to manually add js files to it.

The problem is ionic serve somehow locks the file before my gulp task finishes so my gulp task cant open the index.html file for writing.

Have people solved this somehow?

Nevermind, problem was on my end.