module-alias icon indicating copy to clipboard operation
module-alias copied to clipboard

Register aliases of directories and custom module paths in Node

Results 58 module-alias issues
Sort by recently updated
recently updated
newest added

I am using plain JavaScript for building APIs using Node.js and Express.js. I have the following module alias configuration, which is heavily used across my project in require statements: ```...

Ive put `require("module-alias/register");` at the top of layout.tsx but I get this error: Error: Unable to find package.json in any of: [/Users/me/projects/report/live-demo/.next, /Users/me/projects/report/live-demo]

## index.js ```js require('module-alias/register') ... ``` ## `package.json` ```js { ... "_moduleAliases": { "#root": "./", "#src": "./src", "#routes": "./src/routes", "#lib": "./src/lib", "#utils": "./src/lib/utils", "#models": "./src/lib/models", "#decors": "./src/lib/decors", "#schemas": "./src/lib/schemas" }...

Hey, thanks for this awesome package. I failed at my first attempt to use this, and was able to use it with some debug and research here and there. It...

I'm unable to use moduleDirectories specification when deploying code to AWS Lambda I believe bug is in [this](https://github.com/ilearnio/module-alias/blob/dev/index.js#L215-L217) function ``` function getMainModule () { return require.main._simulateRepl ? undefined : require.main...

Add example to point jest to a single file not a module.