ilearnio / module-alias

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

Is it good to use this package for my project? #131

Closed Zt-freak closed 2 years ago

Zt-freak commented 2 years ago

Hi, I read in the readme that it's not a good idea to use this package if you want to publish an NPM package, but what if your package is going to be installed globally as a CLI, is it ok to use this?

If not, is there another way to get path aliases to work? I keep getting module not found errors when I load up my application.

Kehrlann commented 2 years ago

Hi @Zt-freak ,

Cli apps should be fine. The warning, as in  “you can use this but there are limitations” is for code that is loaded by other code, because:

Hope this helps !

Zt-freak commented 2 years ago

@Kehrlann thank you for the information.