@babel/plugin-transform-export-namespace-from
NOTE: This plugin is included in
@babel/preset-env
, in ES2020
Example
JavaScript
export * as ns from "mod";
Installation
- npm
- Yarn
- pnpm
npm install --save-dev @babel/plugin-transform-export-namespace-from
yarn add --dev @babel/plugin-transform-export-namespace-from
pnpm add --save-dev @babel/plugin-transform-export-namespace-from
Usage
With a configuration file (Recommended)
babel.config.json
{
"plugins": ["@babel/plugin-transform-export-namespace-from"]
}
Via CLI
Shell
babel --plugins @babel/plugin-transform-export-namespace-from script.js
Via Node API
JavaScript
require("@babel/core").transformSync("code", {
plugins: ["@babel/plugin-transform-export-namespace-from"],
});