Skip to content

Commit b0ffb82

Browse files
author
mayintao3
committed
fix: 修改判断.d.ts的正则,修复正常d结尾文件被识别成类型文件的问题
1 parent 786c0bb commit b0ffb82

File tree

1 file changed

+1
-1
lines changed
  • packages/taro-platform-harmony/src/program

1 file changed

+1
-1
lines changed

packages/taro-platform-harmony/src/program/arkTS.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export default class Harmony extends TaroPlatformHarmony {
266266
define.global = 'globalThis'
267267
}
268268
const ext = path.extname(target)
269-
if (![/d\.e?tsx?$/, /\.(json|map|md)$/].some(e => e.test(target))) {
269+
if (![/\.d\.e?tsx?$/, /\.(json|map|md)$/].some(e => e.test(target))) {
270270
code = this.replaceDefineValue(code, define, ext)
271271
}
272272
if (['.ts'].includes(ext)) {

0 commit comments

Comments
 (0)