Skip to content

bardiharborow/babel-plugin-transform-es2015-modules-strip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Babel plugin which strips import and export statements from modules.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published