The <script> tag contains the JavaScript code associated with the component. It should export the component definition object.
Here's an example of a <script> tag:
<script>
export default {
data () {
return {
movies: [
{ title: 'Star Wars' },
{ title: 'Blade Runner' },
],
}
},
}
</script>
In this example, the component will have a data hook returning an initial state with a movies array.
The <script> tag is optional if you don't need any options in the component options, which defaults to an empty object.