babel-plugin-normalize-requires

2.32.0 • Public • Published

babel-plugin-normalize-requires

Normalize AMD require() calls.

Example

In

require('./a-module.js');

Out

require('./a-module');

Installation

npm install --save-dev babel-plugin-normalize-requires

Usage

Add the following to your .babelrc file:

{
	"plugins": ["normalize-requires"]
}

Technical Details

This plugin removes .js and / suffixes from module names used in AMD require() calls.

However, the plugin is smart enough to not remove .js suffixes when they are part of the npm package name (as opposed to module name).

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-normalize-requires

Weekly Downloads

7,642

Version

2.32.0

License

none

Unpacked Size

12 kB

Total Files

7

Last publish

Collaborators

  • antonio-ortega
  • daniel.sanz
  • izaera-lr
  • edalgrin
  • pat270
  • liferay
  • bryceosterhaus
  • matuzalemteles
  • gagranta
  • p2kmgcl
  • marko.cikos
  • kresimircoko
  • wincent
  • izaera