From b0dec7937e51cce9a6de06b44409f6f851917361 Mon Sep 17 00:00:00 2001 From: Samrith Shankar Date: Mon, 26 Apr 2021 02:30:13 +0530 Subject: [PATCH] refactor: revert changes to `AssetMap` and unhandle edge-case --- src/core/AssetMap.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/AssetMap.ts b/src/core/AssetMap.ts index ed30f65..475ad9f 100644 --- a/src/core/AssetMap.ts +++ b/src/core/AssetMap.ts @@ -41,8 +41,8 @@ export class AssetMap extends ConfigProvider { } private getFile(depAsset: ParcelBundle): string { - const isRelative = !!depAsset.entryAsset?.relativeName; - return isRelative ? depAsset.entryAsset?.relativeName : path.basename(depAsset.name); + const isRelative = depAsset.type === 'html' && !!depAsset.entryAsset?.relativeName; + return isRelative ? depAsset.entryAsset.relativeName : path.basename(depAsset.name); } private iterativeDependencyResolver(depAsset: ParcelBundle): void {