Hi I'm trying to use with Vue.js/Webpack but I'm in trouble to build that.
To run dev server it's ok. I create a function to add the *.js on the document, and call this function when the component is mounted:
addExternalScrips () {
let snap = document.createElement('script');
let underscore = document.createElement('script');
let sequence = document.createElement('script');
snap.setAttribute('src', '../../utils/snap.svg-min.js');
underscore.setAttribute('src', '../../utils/underscore-min.js');
sequence.setAttribute('src', '../../utils/sequence-diagram-min.js');
document.head.appendChild(snap);
document.head.appendChild(underscore);
document.head.appendChild(sequence);
}
But when I try to build this didn't work.
I tried to import the files on Vue.js component like that:
import '../../utils/webfont';
Hi I'm trying to use with Vue.js/Webpack but I'm in trouble to build that. To run dev server it's ok. I create a function to add the *.js on the document, and call this function when the component is mounted:
addExternalScrips () { let snap = document.createElement('script'); let underscore = document.createElement('script'); let sequence = document.createElement('script'); snap.setAttribute('src', '../../utils/snap.svg-min.js'); underscore.setAttribute('src', '../../utils/underscore-min.js'); sequence.setAttribute('src', '../../utils/sequence-diagram-min.js'); document.head.appendChild(snap); document.head.appendChild(underscore); document.head.appendChild(sequence); }
But when I try to build this didn't work.
I tried to import the files on Vue.js component like that:
import '../../utils/webfont';
But got error that didn't find any modules.
Do you guys know how to do that? Thanks!