babel-plugin-resolve-bower-module
![Build Status](https://travis-ci.org/wrumsby/babel-plugin-resolve-bower-module.svg?branch=master)
A Babel plugin to resolve ES6 imports that reference Bower modules.
Installation
npm install babel-plugin-resolve-bower-module --save-dev
In your .babelrc
file add the plugin to the plugins
array:
{
"plugins": [
"resolve-bower-module"
]
}
How it works
This plugin will look for import
statements where the module-name
matches a Bower module that is declared as a dependency
or a devDependency
of the project, e.g.
import foo from 'foo';
will be transformed to something like
import foo from '../../bower_components/foo/src/index';