【发布时间】:2018-04-18 22:33:46
【问题描述】:
Visual Studio intellisense 正确识别出 Promise 来自 Bluebird,但似乎 webpack 被混淆了,当我在浏览器中调试主包时,我发现 Promise 不是“bluebird”Promise。
我正在为 reactJS 使用 Asp.net 核心模板。我有: "webpack": "2.5.1", “蓝鸟”:“3.5.1”, "@types/bluebird": "2.0.33"
这是我的 ts.config:
{
"compilerOptions": {
"baseUrl": "./ClientApp",
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"jsx": "react",
"sourceMap": true,
"noImplicitAny": true,
"skipDefaultLibCheck": true,
//"strict": true,
"lib": [ "dom", "es5", "es2015.iterable", "scripthost", "es2015.promise" ],
"types": [ "webpack-env" ],
"experimentalDecorators": true
},
"exclude": [
"bin",
"node_modules"
]
}
如何将 webpack 配置为始终使用 'bluebird' Promise?
【问题讨论】:
标签: typescript promise bluebird webpack-2 typescript-typings