Skip to content

Commit 9a5a04a

Browse files
liujupingJackLian
authored andcommitted
fix: fix css resources with parameters not loading correctly
1 parent 4d6dfe9 commit 9a5a04a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/utils/src/asset.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ import { createDefer } from './create-defer';
44
import { load, evaluate } from './script';
55

66
// API 向下兼容
7-
export { AssetItem, AssetType, AssetLevels, Asset, AssetList, AssetBundle, AssetLevel, AssetsJson } from '@alilc/lowcode-types';
7+
export { AssetType, AssetLevels, Asset, AssetList, AssetBundle, AssetLevel, AssetsJson } from '@alilc/lowcode-types';
88

99
export function isAssetItem(obj: any): obj is AssetItem {
1010
return obj && obj.type;
1111
}
1212

13+
export type { AssetItem } from '@alilc/lowcode-types';
14+
1315
export function isAssetBundle(obj: any): obj is AssetBundle {
1416
return obj && obj.type === AssetType.Bundle;
1517
}

packages/utils/src/is-css-url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export function isCSSUrl(url: string): boolean {
2-
return /\.css$/.test(url);
2+
return /\.css(\?.*)?$/.test(url);
33
}

0 commit comments

Comments
 (0)