diff --git a/packages/host/src/node/path-utils.ts b/packages/host/src/node/path-utils.ts index ec93df86..179688ce 100644 --- a/packages/host/src/node/path-utils.ts +++ b/packages/host/src/node/path-utils.ts @@ -148,9 +148,10 @@ export function escapePath(modulePath: string) { */ export function getLibraryName(modulePath: string, naming: NamingStrategy) { const { packageName, relativePath } = determineModuleContext(modulePath); + const escapedPackageName = escapePath(packageName); return naming.stripPathSuffix - ? packageName - : `${packageName}--${escapePath(relativePath)}`; + ? escapedPackageName + : `${escapedPackageName}--${escapePath(relativePath)}`; } export function prettyPath(p: string) {