W3cubDocs

/Babel

Syntax export extensions

Syntax only

This plugin only allows Babel to parse this syntax. If you want to transform it then see export-extensions.

This plugin allows Babel to parse export extensions.

Installation

npm install --save-dev babel-plugin-syntax-export-extensions

Usage

.babelrc

{
  "plugins": ["syntax-export-extensions"]
}

Via CLI

babel --plugins syntax-export-extensions script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["syntax-export-extensions"]
});

© 2018 Sebastian McKenzie
Licensed under the MIT License.
http://babeljs.io/docs/plugins/syntax-export-extensions/