I am using Django for backend and I want to use a Vue.js library for frontend. I am including them with CDN. The problem is that the first line of the script always gets the error Uncaught SyntaxError: Unexpected identifier. I suspect that this is because of the import, but I don't know how to use the library otherwise. Any ideas? Thanks in advance.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>title</title>
<link rel="stylesheet" type="text/css" href="/static/fortykwords/style.css" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<script src="https://unpkg.com/@johmun/vue-tags-input/dist/vue-tags-input.js"></script>
</head>
<body>
<ul class="sidebar-nav">
<p>sidebar</p>
<li><a href="/profile/">pepe14</a></li>
<li><a href="/accounts/logout/?next=/submit/">Logout</a></li>
</ul>
<template>
<div>
<vue-tags-input
v-model="tag"
:tags="tags"
@tags-changed="newTags => tags = newTags"
/>
</div>
</template>
<script>
import VueTagsInput from '@johmun/vue-tags-input';
export default {
components: {
VueTagsInput,
},
data() {
return {
tag: '',
tags: [],
};
},
};
</script>
<form action="" method="post">
<input type='hidden' name='csrfmiddlewaretoken' value='fEEj9YrFOkChjlhrZ7HPgDoiJNcnb0ILUrd143icwaZ58No1Ckl8tTr0p9TxRMi7' />
<table>
<tr><th><label for="id_title">Title:</label></th><td><input type="text" name="title" required id="id_title" maxlength="250" /></td></tr>
<tr><th><label for="id_body">Body:</label></th><td><textarea name="body" cols="40" required id="id_body" maxlength="40000" rows="10">
</textarea></td></tr>
<tr><th><label for="id_tags">Tags:</label></th><td><input type="text" name="tags" required id="id_tags" /><br /><span class="helptext">A comma-separated list of tags.</span></td></tr>
</table>
<input type="submit" value="Submit" />
</form>
</body>
</html>