Does the code inside the js file gets run during the import? if yes, then once or each time? e.g.
// a.js console.log(\"A\"); const a = \"a\"; export defaul
Yes, it does, exactly one time.
See http://www.ecma-international.org/ecma-262/6.0/#sec-abstract-module-records:
Do nothing if this module has already been evaluated. Otherwise, transitively evaluate all module dependences of this module and then evaluate this module