Today I Learned

A Hashrocket project

Alias an NPM Package with `yarn add`

Ever needed to install a package under an alias? Or maybe you need to install 2 versions of the same dependency.

You can handle this on install with yarn:

yarn add react-select@v1.2.0
yarn add react-select-next@npm:react-select@next

Now you can import your aliased dependency with:

import Select from 'react-select-next'
Looking for help? At Hashrocket, our JavaScript experts launch scalable, performant apps on the Web, Android and iOS. Contact us and find out how we can help you.