需要在tsconfig.json中加入配置
"moduleResolution": "node"
{ "compilerOptions": { "jsx": "react", "module": "es6", "target": "es5", "sourceMap": true, "moduleResolution": "node" }, "exclude": [ "node_modules" ] }
需要在tsconfig.json中加入配置
"moduleResolution": "node"
{ "compilerOptions": { "jsx": "react", "module": "es6", "target": "es5", "sourceMap": true, "moduleResolution": "node" }, "exclude": [ "node_modules" ] }