I'm trying to find a javascript workflow solution to bundle my code in multiple files. I have a question I can't find the answer, maybe it's under my eyes but well...
If I use javascript import in a JS file for functionalities, that will be bundle into one JS file.
import anime from "animejs";
class Functionality1 {
// some code using animeJs
}
export let functionality1 = new Functionality1();
import anime from "animejs";
class Functionality2 {
// some code using animeJS
}
export let functionality2 = new Functionality2();
So at the end, I have 2 bundled files functionality1.js and functionality2.js. But both import animeJS library. If they are called on the same page, is AnimeJS called twice two ?
Thank you