cocoscreator: 3.0
首先是A文件中.如下
export namespace A {
export const AA : string = “AA”
export const AAA : string = “AAA”
}
然后在B文件中,引入了A,然后重命名导出
import { A } from “./A”
export namespace A {
export const BB : string = “BB”
export const BBB : string = "BBB“
export import a = A
}
这样写我在C文件只需要引入B文件,也弄使用到A文件的中AA和AAA.
这样的写法在2.4.4是可以正常运行的.
现在升级到了3.0.由于Cocos Creator 支持 TypeScript 4.1.0。在此基础上,做了限制
不能使用 impor = 的写法了,
现在这样写 编辑器会有对应的报错:
SyntaxError: unknown: import = is not supported by @babel/plugin-transform-typescript
请问我现在应该怎么改?
