babel-plugin-transform-es2015-modules-strip

0.1.2 • Public • Published

babel-plugin-transform-es2015-modules-strip

This project has a package hosted on the NPM repository. This project is licensed under the terms of the MIT license.

This is a Babel plugin which strips import and export statements from modules.

Example

In

import path from 'path';

console.log(path.sep);

export default 42;

Out

console.log(path.sep);

Installation

npm install --save-dev babel-plugin-transform-es2015-modules-strip

Usage

With a configuration file (Recommended)

{
  "presets": [
    ["@babel/env", {
      "modules": false
    }]
  ],
  "plugins": ["transform-es2015-modules-strip"]
}

Via Node API

require("@babel/core").transformSync("code", {
  presets: [
    ["@babel/env", {
      "modules": false
    }]
  ],
  plugins: ["transform-es2015-modules-strip"]
});

License

This project is licensed under the terms of the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i babel-plugin-transform-es2015-modules-strip

Weekly Downloads

1,615

Version

0.1.2

License

MIT

Unpacked Size

6.66 kB

Total Files

9

Last publish

Collaborators

  • bardiharborow