I have two javascript modules that looks like this:
// inner/mod.js
export function myFunc() {
// ...
}
// mod.js
import * as inner from \"./inner/mod\";
I believe what you are looking for is
export * from './inner/mod';
That will reexports all exports of ./inner/mod
. The spec actually has very nice tables listing all the possible import and export variants.
// inner/mod.js
export function myFunc() {
// ...
}
// mod.js
import { myFunc } from "./inner/mod";
export { myFunc };
Try to be explicit in what you import, the less the better, because of that I've changed your import in mod.js. If you do import *, you define a variable which will be the object of all names exports from that module you imported.
re-exporting is the same as making something of your own and exporting.