Skip to content

Commit

Permalink
fix: 修改判断.d.ts的正则,修复正常d结尾文件被识别成类型文件的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mayintao3 committed Jan 23, 2025
1 parent 786c0bb commit b0ffb82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-platform-harmony/src/program/arkTS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export default class Harmony extends TaroPlatformHarmony {
define.global = 'globalThis'
}
const ext = path.extname(target)
if (![/d\.e?tsx?$/, /\.(json|map|md)$/].some(e => e.test(target))) {
if (![/\.d\.e?tsx?$/, /\.(json|map|md)$/].some(e => e.test(target))) {
code = this.replaceDefineValue(code, define, ext)
}
if (['.ts'].includes(ext)) {
Expand Down

0 comments on commit b0ffb82

Please sign in to comment.