@nodejs-loaders/alias
Advanced tools
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"alias.loader.d.mts","sourceRoot":"","sources":["alias.loader.mjs"],"names":[],"mappings":"wIAgFg7c,CAAC;2BA5En6c,OAAO,WAAW,EAAE,YAAY;sBAChC,OAAO,eAAe,EAAE,OAAO;;;;;cAInC,MAAM,GAAG,OAAO;;0BAcb,OAAO,aAAa,EAAE,WAAW;4BACjC,UAAU,CAAC,WAAW,CAAC;+BACvB,aAAa,CAAC,CAAC,CAAC;yBAChB,aAAa,CAAC,CAAC,CAAC;;uIAsDm5c,CAAC"} | ||
| {"version":3,"file":"alias.loader.d.mts","sourceRoot":"","sources":["alias.loader.mjs"],"names":[],"mappings":"wIAiF44c,CAAC;2BA7E/3c,OAAO,WAAW,EAAE,YAAY;sBAChC,OAAO,eAAe,EAAE,OAAO;;;;;cAInC,MAAM,GAAG,OAAO;;0BAcb,OAAO,aAAa,EAAE,WAAW;4BACjC,UAAU,CAAC,WAAW,CAAC;+BACvB,aAAa,CAAC,CAAC,CAAC;yBAChB,aAAa,CAAC,CAAC,CAAC;;uIAuD+2c,CAAC"} |
+2
-1
@@ -65,3 +65,4 @@ // oxlint-disable eslint/max-depth | ||
| // Need the promise path for the async path (module.register) | ||
| if ('catch' in resolved && typeof resolved?.catch === 'function') { | ||
| // Eff you typescript | ||
| if (resolved && 'catch' in resolved && typeof resolved.catch === 'function') { | ||
| return resolved.catch((err) => { | ||
@@ -68,0 +69,0 @@ if (err.code !== 'ERR_MODULE_NOT_FOUND') throw err; |
+1
-1
| { | ||
| "version": "2.1.0", | ||
| "version": "2.1.1", | ||
| "name": "@nodejs-loaders/alias", | ||
@@ -4,0 +4,0 @@ "description": "Extend node to support TypeScript 'paths' via customization hooks.", |
+2
-2
@@ -28,3 +28,3 @@ # Nodejs Loaders: Alias | ||
| > [!CAUTION] | ||
| > **Consider using Node.js's [subpath imports](https://nodejs.org/api/packages.html#subpath-imports). It's more performant and doesn't require a loader. If you are using `tsc` for type-checking, set [compilerOptions.moduleResolution to `node16` or higher](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-imports-and-self-name-imports). | ||
| > Consider using Node.js's [subpath imports](https://nodejs.org/api/packages.html#subpath-imports). It's more performant and doesn't require a loader. If you are using `tsc` for type-checking, set [compilerOptions.moduleResolution to `node16` or higher](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-imports-and-self-name-imports). | ||
@@ -44,3 +44,3 @@ ## `compilerOptions.baseUrl` | ||
| > [!WARN] | ||
| > [!IMPORTANT] | ||
| > If an aliased specifier successfully resolves to a "local" module, you will not be able to reach one in `node_modules`. This behaviour is consistent with Node.js and tsc, but it can still be a gotcha. | ||
@@ -47,0 +47,0 @@ |
13872
0.28%166
0.61%