nom-de-plume
v2.0.0
Published
Allows aliasing of module names
Readme
Nom De Plume
Provide the ability to alias package names in order to substitute one dependency for another.
Install
npm install nom-de-plume --save
Usage
In your package.json file
{
"alias": {
"underscore": "lodash",
"react": "preact-compat",
"react-dom": "preact-compat"
}
}Or in an .aliasrc file
{
"underscore": "lodash",
"react": "preact-compat",
"react-dom": "preact-compat"
}require('nom-de-plume');
const react = require('react'); //Preact instead
const _ = require('underscore'); // lodashconst ndp = require('nom-de-plume');
const react = require('react'); //Preact instead
const _ = require('underscore'); // lodash
ndp.clear(); // will remove the aliased lookups
const underscore = require('underscore'); //actually underscore