Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shnhrrsn/babel-plugin-import-auto-name
Babel plugin to auto-expand nameless imports
https://github.com/shnhrrsn/babel-plugin-import-auto-name
babel babel-plugin
Last synced: 16 days ago
JSON representation
Babel plugin to auto-expand nameless imports
- Host: GitHub
- URL: https://github.com/shnhrrsn/babel-plugin-import-auto-name
- Owner: shnhrrsn
- License: mit
- Created: 2016-05-09T02:52:44.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-08T04:44:46.000Z (almost 8 years ago)
- Last Synced: 2025-01-02T06:56:17.316Z (17 days ago)
- Topics: babel, babel-plugin
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
# babel-plugin-import-auto-name
A [babel](http://babeljs.io) plugin to automatically expand nameless imports.
## Description
Instead of redudantly importing the same name as the file, you’ll be able to just import the file.
Here’s a simple example:
```js
// Instead of using this:
import { thing } from 'some/thing';// You can just use:
import 'some/thing';
```## Conditions
The plugin has a few conditions requires to auto-expand the name:
1. The `import` command can not specify any names (duh)
2. A forward slash is required (as not to intefere with regular modules)
3. No file extension can be specified