Typescript/babel import causing “_1.default is not a function”
问题 I am trying to use https://github.com/timmywil/panzoom from a typescript project compiled with webpack and babel. The problem is that the typescript method call: import Panzoom from '@panzoom/panzoom'; Panzoom(document.querySelector("#pic")); is transpiled to the following javascript: panzoom_1.default(document.querySelector("#pic")); which then generates the following run-time error: Uncaught TypeError: panzoom_1.default is not a function If I debug the javascript then panzoom_1 has the