Module namespace exports

发布时间 · 标签: ECMAScript ES2020

In JavaScript modules, it was already possible to use the following syntax:

import * as utils from './utils.mjs';

However, no symmetric export syntax existed… until now:

export * as utils from './utils.mjs';

This is equivalent to the following:

import * as utils from './utils.mjs';
export { utils };