babel-plugin-import-auto-name
v0.2.1
Published
Babel plugin to auto-expand nameless imports
Downloads
116
Maintainers
Readme
babel-plugin-import-auto-name
A babel 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:
// 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:
- The
import
command can not specify any names (duh) - A forward slash is required (as not to intefere with regular modules)
- No file extension can be specified