Answer the question
In order to leave comments, you need to log in
How to include external js file in .vue file?
If you use require() or import it looks in node.js modules .
Tried with relative path
</template>
<script src="../node_server/index.js"></script>
<script>
var socket = window.IO; // initialize socket connection
export default {
props: [
<script src="{{ hostname }}/js/node/index.js"></script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question