EN当我使用ts-node-dev时,导入的文件必须命名为"./api“或"./api.ts”,并且在构建项目时(使用tsc),我需要"./api.js“(这是正常的...它变成了纯js)。Vue开源的组件库有很多,基本各个大厂都会做一个,所以作为个人再重复造轮子其实意义也不是很大,但是笔者对于如何设计一个Vue组件库还是挺感兴趣的。在实际项目
Added the --esm flag to the dev script: "dev": "ts-node-dev --esm src/index.ts" Tried replacing ts-node-dev with ts-node: ts-node --esm src/index.ts Still got this error : Compiled with tsc and ran the output with node, which worked fine. tsc /src/index.ts node dist/index...
EN当我使用ts-node-dev时,导入的文件必须命名为"./api“或"./api.ts”,并且在构建项目时(使用tsc...