babel-plugin-dotjs
v1.0.0
Published
This is a script to put '.js' in string of import statemented.
Downloads
3
Maintainers
Readme
babel-plugin-dotjs
This is a script to put '.js' in string of import statemented.
Example
In
// input code
import { submodule } from './path/to/module'
Out
// output code
import { submodule } from './path/to/module.js'
Installation
$ npm install babel-plugin-dotjs
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["dotjs"]
}
Via CLI
$ babel --plugins dotjs script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["dotjs"]
});
Future
In future this code will resolve suffix to diferents extensions.