https://github.com/bardiharborow/babel-plugin-transform-es2015-modules-strip
A Babel plugin which strips import and export statements from modules.
https://github.com/bardiharborow/babel-plugin-transform-es2015-modules-strip
babel-plugin es6-modules
Last synced: 11 months ago
JSON representation
A Babel plugin which strips import and export statements from modules.
- Host: GitHub
- URL: https://github.com/bardiharborow/babel-plugin-transform-es2015-modules-strip
- Owner: bardiharborow
- License: mit
- Created: 2016-09-15T10:56:23.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-03-18T03:49:00.000Z (over 5 years ago)
- Last Synced: 2025-06-25T20:05:21.120Z (about 1 year ago)
- Topics: babel-plugin, es6-modules
- Language: JavaScript
- Homepage:
- Size: 138 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# babel-plugin-transform-es2015-modules-strip
[](https://www.npmjs.com/package/babel-plugin-transform-es2015-modules-strip)

[](https://github.com/bardiharborow/babel-plugin-transform-es2015-modules-strip/blob/master/LICENSE)
This is a Babel plugin which strips import and export statements from modules.
## Example
**In**
```javascript
import path from 'path';
console.log(path.sep);
export default 42;
```
**Out**
```javascript
console.log(path.sep);
```
## Installation
```sh
npm install --save-dev babel-plugin-transform-es2015-modules-strip
```
## Usage
### With a configuration file (Recommended)
```json
{
"presets": [
["@babel/env", {
"modules": false
}]
],
"plugins": ["transform-es2015-modules-strip"]
}
```
### Via Node API
```javascript
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](LICENSE).