I have two javascript modules that look like this:
// inner/mod.js export function myFunc() { // ... } // mod.js import * as inner from "./inner/mod";
I would like to export myFunc from mod.js How can i do this?
EDIT: I must clarify that the function is exported, as expected, from inner/mod.js , but I also want to export funtion from external mod.js
For those seeking clarification, I would like to achieve this:
// SomeOtherFile.js import * as mod from "mod"; // NOT inner/mod mod.myFunc();
javascript ecmascript-6 es2015
Max Dec 23 '15 at 22:49 2015-12-23 22:49
source share