0๐
Iโm not a Django developer, but I think maybe you can just split out them into two files or add a condition like:
const vueApp = document.querySelector('#vue-app')
if(vueApp){
// mount the app
}
0๐
Vue warnings are not emitted in the production (minified) version of Vue, so you could load vue.min.js
:
new Vue({
el: '#does_not_exist',
})
<script src="https://unpkg.com/vue@2.6.10/dist/vue.min.js"></script>
<div id="app">
<p>{{ message }}</p>
</div>
Source:stackexchange.com