GitHub · npm · Edit this page
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.
npm install --save-dev babel-plugin-syntax-export-extensions
.babelrc
(Recommended).babelrc
{
"plugins": ["syntax-export-extensions"]
}
babel --plugins syntax-export-extensions script.js
require("babel-core").transform("code", {
plugins: ["syntax-export-extensions"]
});