0👍
Well, you could do either one of the following:
<template>
<div>
<!-- the template -->
</div>
</template>
<script>
import "assets/homepage/js/plugin.js";
import "assets/homepage/js/fullsreen-showcase.js";
import "assets/homepage/js/main.js";
// Or if those files are modules
// import Something from "assets/homepage/js/plugin.js";
// ...
export default {
// ...
}
</script>
Or:
<template>
<div>
<!-- the template -->
</div>
</template>
<script src="assets/homepage/js/main.js"></script>
main.js
Import the rest of the JS files, considering main.js
as the entry point.
import "assets/homepage/js/plugin.js";
import "assets/homepage/js/fullsreen-showcase.js";
export default {
// ...
}
- [Vuejs]-Laravel and vue: require is not defined
- [Vuejs]-Vue.js Transitions – 1st Entrance Not Working
Source:stackexchange.com