依赖性:
盗版者:^ 3.0.2
Dev依赖项:
Webpack:^ 4.29.6
打字稿:^ 3.3.3333
@ types / delaunator:^ 2.0.0
我将库原样导入我的主要ts文件中:
import * as Delaunator from 'delaunator';
...
let triangles = Delaunator.from(this.vertices, point => point.x, point => point.y).triangles;
Webpack在构建时显示警告:
WARNING in ./src/index.ts 143:24-39
"export 'from' (imported as 'Delaunator') was not found in 'delaunator'
在我的浏览器中,出现以下错误:
TypeError: delaunator__WEBPACK_IMPORTED_MODULE_2__.from is not a function
我遵循了DefinitelyTyped示例(link)。
您知道为什么会发生此错误吗?(我与其他库没有这个问题)