I use Gulp + Babel to transpile a plugin I'm making to be used in another project. The "project" uses React, instantiated in window.React. In my "plugin", I use NPM components that already import React in their dependencies, and when transpiling, React goes along, leaving 2 React instances in the project with the plugin.
Is there any way to tell the transpiler to replace React imports with window.React?