Reputation: 3553
I have an app which uses vue and laravel with laravel mix, I installed a js library called ProgressBar.js via npm install, however now I don't know how to use that library in my .vue files, how can I use the library inside my single file components, maybe adding it to the vue prototype, but how can I require it now?
https://progressbarjs.readthedocs.io/en/latest/#install
Upvotes: 0
Views: 64
Reputation: 376
If you started your Vue app with vue create
command, you can simply import it in your App.vue. Example:
<script>
import ProgressBar from 'progressbar.js'
export default {
mounted() {
const line = new ProgressBar.Line('#container')
}
}
</scirpt>
Upvotes: 1