Skip to content

Commit 22488d5

Browse files
committed
fix(custom-loader): handle @fs/ protocol in module resolution
Ensure that specifiers using the @fs/ protocol are properly resolved by stripping the prefix before invoking the next resolver. This fixes compatibility issues with certain module paths during the resolution process.
1 parent e40dd69 commit 22488d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/nx-angular-mf/src/builders/custom-loader/custom-loader-serve.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export async function resolve(
113113
const resolveUrl = resolveModulePath(importMap, specifier, parentURL);
114114

115115
if (checkIfNodeProtocol(resolveUrl) || checkIfFileProtocol(resolveUrl)) {
116-
return nextResolve(specifier, context, nextResolve);
116+
return nextResolve(specifier.replace('@fs/', ''), context, nextResolve);
117117
}
118118

119119
if (!importMapName && !resolveUrl) {

0 commit comments

Comments
 (0)