babel-plugin-import-alias-npm

0.0.1 • Public • Published

babel-plugin-import-alias-npm

A babel plugin that allows using aliases to reference npm files in ES2015 imports.

Requirements

This plugin assumes that NPM is being used with version >= 3.0.0. That's important because that's the first NPM version that uses flat dependencies, a feature that this plugin depends on.

Usage

This is a babel plugin that converts imports with sources starting with the npm: prefix to their path inside the node_modules folder. To use it, just add it to your package.json and pass it as a plugin when calling babel:

{
  "plugins": ["import-alias-npm"]
}

Package Sidebar

Install

npm i babel-plugin-import-alias-npm

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • mairatma