In my web app I make use of Vue.js for a number of small components around the site. I store the Vue instances in their own js files which I concatonate, minify etc using gulp.
There is a small issue where if the target element for a particular Vue instance doesn't exist on the page a warning appears in the console:
[Vue warn]: Cannot find element: #vueElement
Although this doesn't harm anything as it is it left me wondering what the correct approach is to loading my Vue instances. Is there a way to prevent it firing if the target element isn't there?