@babel/plugin-transform-export-namespace-from

export-namespace-from - 图1info

This plugin is included in @babel/preset-env, in ES2020

Example

JavaScript

  1. export * as ns from "mod";

Installation

  • npm
  • Yarn
  • pnpm
  1. npm install --save-dev @babel/plugin-transform-export-namespace-from
  1. yarn add --dev @babel/plugin-transform-export-namespace-from
  1. pnpm add --save-dev @babel/plugin-transform-export-namespace-from

Usage

babel.config.json

  1. {
  2. "plugins": ["@babel/plugin-transform-export-namespace-from"]
  3. }

Via CLI

Shell

  1. babel --plugins @babel/plugin-transform-export-namespace-from script.js

Via Node API

JavaScript

  1. require("@babel/core").transformSync("code", {
  2. plugins: ["@babel/plugin-transform-export-namespace-from"],
  3. });

References