Reputation: 1364
I want to run an example from the basic usage section of https://github.com/AlbertLucianto/vue-text-highlight . I see a blank page when I open index.html in Firefox.
The code I'm using is at https://github.com/michaelhochleitner/vue-text-highlight-basic-usage .
I took the syntax for
<script>
module.exports = {
data: function () {
return {
queries: ['birds', 'scatt'],
description: 'Tropical birds scattered as Drake veered the Jeep'
};
}
}
</script>
from https://v2.vuejs.org/v2/guide/single-file-components.html .
Why does index.html not display anything?
Upvotes: 0
Views: 153
Reputation: 2293
You cannot use import
statements in .js files like that. That is reserved syntax that converts a package in files that your bundle can then use. I recommend getting started with the vue-cli so that you can work on a fully-fledged Vue project and import/use packages the way you described.
Upvotes: 2