I recently started using Vue.js
and decided to try out the https://github.com/olefirenko/vue-google-autocomplete component.
I went ahead and downloaded this file from:
https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a2d4d7c78fc5cdcdc5cec78fc3d7d6cdc1cdcfd2cec7d6c7e2938c938c92">[email protected]</a>/src/VueGoogleAutocomplete.vue
After downloading, I added it to my static folder.
Following that, I created a new file named create.js
where I imported the module.
import VueGoogleAutocomplete from '/static/addresses/VueGoogleAutocomplete.vue'
Vue.component('vue-google-autocomplete',VueGoogleAutocomplete);
var app = new Vue({
delimiters: ['[[', ']]'],
el: '#app',
...
However, upon reloading the page, I encountered an error in Chrome:
VueGoogleAutocomplete.vue:1 Failed to load module script: The server responded with a non-JavaScript MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec.
Has anyone else come across this issue before? Any insights on how to resolve it?