I've been grappling with the challenge of integrating additional JS files into my Vue Application through my App.vue file for quite some time now. Specifically, I'm interested in including scripts that are stored in a separate file within my scripts folder. Let's say, hypothetically, I want to incorporate a JS file named winelist.js. Is it possible to achieve this?
<template>
<div id="app">
<LoadingScreen :isLoading="isLoading" />
<div v-if="!isLoading">
<router-view/>
</div>
<PrimaryAppNav/>
</div>
</template>
<script>
import PrimaryAppNav from './components/PrimaryAppNav.vue'
import LoadingScreen from "./components/LoadingScreen";
export default {
name: 'app',
components: {
PrimaryAppNav,
LoadingScreen
},
data() {
return { isLoading: true };
},
mounted() {
setTimeout(() => {
this.isLoading = false;
}, 3000);
}
}
</script>
<style lang="scss">
@import 'scss/bootstrap.css';
@import 'scss/mixins.scss';
@import 'scss/helpers.scss';
@import 'scss/main.scss';
</style>