babel-plugin-module-extension

0.1.3 • Public • Published

babel-plugin-module-extension

A babel plugin that transform the extension of the imported module

MIT

NPM

Install

npm install --save-dev babel-plugin-module-extension
// or
yarn add --dev babel-plugin-module-extension

Usage

// .babelrc
{
  "plugins": [
    ["module-extension", options]
  ]
}

Options

options is a object

{
  less: 'css', // less is your original ext, css is your target ext
  js: '', // if target ext is empty string, plugin will remove the ext
}

License

MIT

Package Sidebar

Install

npm i babel-plugin-module-extension

Weekly Downloads

1,847

Version

0.1.3

License

MIT

Unpacked Size

4.63 kB

Total Files

6

Last publish

Collaborators

  • beilunyang