1.0.0 • Published 6 years ago

babel-plugin-dotjs v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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.