Skip to content

mairatma/babel-plugin-import-alias-npm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"]
}

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published