Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beilunyang/babel-plugin-module-extension
A babel plugin that transform the extension of the imported module
https://github.com/beilunyang/babel-plugin-module-extension
babel-plugin
Last synced: 1 day ago
JSON representation
A babel plugin that transform the extension of the imported module
- Host: GitHub
- URL: https://github.com/beilunyang/babel-plugin-module-extension
- Owner: beilunyang
- License: mit
- Created: 2018-12-26T09:50:27.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T08:06:24.000Z (almost 2 years ago)
- Last Synced: 2024-11-11T19:25:25.784Z (6 days ago)
- Topics: babel-plugin
- Language: JavaScript
- Size: 672 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# babel-plugin-module-extension
A babel plugin that transform the extension of the imported module![MIT](https://camo.githubusercontent.com/a54c47c4dc66472c38a6d33b1833d9f6e5adfc8b/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f657870726573732e737667)
[![NPM](https://nodei.co/npm/babel-plugin-module-extension.png)](https://nodei.co/npm/babel-plugin-module-extension/)
## Install
```javascript
npm install --save-dev babel-plugin-module-extension
// or
yarn add --dev babel-plugin-module-extension
```## Usage
```javascript
// .babelrc
{
"plugins": [
["module-extension", options]
]
}
```
### Options
options is a object
``` javascript
{
less: 'css', // less is your original ext, css is your target ext
js: '', // if target ext is empty string, plugin will remove the ext
}
```## License
MIT