Package alias name using NPM/yarn
Wahdan

Wahdan @abdelrahmanahmed

About: Full stack software engineer with a flair for creating elegant solutions with the least amount of time.Exceptional problem solver with an aptitude for troubleshooting and the ability to quickly master

Location:
Egypt - Cairo
Joined:
Sep 23, 2019

Package alias name using NPM/yarn

Publish Date: Feb 14 '20
17 0

Have you ever tried to install a package under an alias? you can do this using NPM or yarn. Lets try to rename lodash package to another name.

with NPM:

npm install yourPackageName@npm:lodash --save

with yarn:

yarn add yourPackageName@npm:lodash

Now you can import your aliased package with

const yourPackageName = require('yourPackageName');

Happy hack week 😎

Comments 0 total

    Add comment