1.0.0 • Published 8 years ago
babel-plugin-dotjs v1.0.0
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-dotjsUsage
Via .babelrc (Recommended)
.babelrc
{
"plugins": ["dotjs"]
}Via CLI
$ babel --plugins dotjs script.jsVia Node API
require("babel-core").transform("code", {
plugins: ["dotjs"]
});Future
In future this code will resolve suffix to diferents extensions.
1.0.0
8 years ago