ilearnio / module-alias

Register aliases of directories and custom module paths in Node
MIT License
1.76k stars 69 forks source link

Want to keep module alias config into another js file.(module.alias.config.js). #62

Closed abdullahmamunv2 closed 5 years ago

abdullahmamunv2 commented 5 years ago

I felt that it will be better if we keep a separate config file(module.alias.config.js) for modules aliases because it will keep both package.json and code clean. I have made all necessary changes. I am giving a sample of config file bellow :

module.alias.config.js ->

module.exports = { _moduleDirectories: ['node_modules_custom'], _moduleAliases: { '@foo2': 'foo2/index.js', '@bar2': 'bar2/index.js' } }