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 {