9👍
✅
You can import the script within your vue component with either
-
import
import '../src/js/drag-and-drop.js';
-
require
require('../src/js/drag-and-drop.js');
in the script section of your component.
e.g.
<template>
<!-- vue component markup -->
</template>
<script>
import drag from '../src/js/drag-and-drop';
export default {
name: 'you-vue-component',
}
</script>
Source:stackexchange.com