79
rated 0 times
[
85]
[
6]
/ answers: 1 / hits: 31904
/ 9 Years ago, wed, december 23, 2015, 12:00:00
I have two javascript modules that looks 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 should clarify that the function is being exported as expected from inner/mod.js
but I also want to export the funtion from the outer mod.js
.
To those asking for clarification, I would like to achieve this:
// SomeOtherFile.js
import * as mod from mod; // NOT inner/mod
mod.myFunc();
More From » ecmascript-6