0👍
You should move your vue.js script at the end of the body section as described in the Vue.js tutorial you are doing.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js"></script>
<body>
<div id="app">
<h1>{{ message }}</h1>
</div>
<script src='./vue.js'></script>
</body>
</html>
More info on where to place your script tag: When to use the <script> tag in the head and body section of a html page?
- [Vuejs]-Cant get data from multiple tables using axios and EntityFramwork
- [Vuejs]-Ionic Secure Storage get() at the start of the app
0👍
You can also leave as it is and change from:
<script src='./vue.js'></script>
To
<script defer src='./vue.js'></script>
- [Vuejs]-How to deploy nuxt.js with mongodb on cpanel
- [Vuejs]-Global object window is undefined in vue.js
Source:stackexchange.com