59naga/babel-plugin-transform-dynamic-import-default

TypeError: Cannot read property 'type' of undefined

59naga opened this issue · 0 comments

if (path.get("argument.callee.type").node !== "Import") {
https://github.com/59naga/babel-plugin-transform-dynamic-import-default/blob/v0.0.3/index.mjs#L4

Since calle doesn't exist in the following syntax, path.get of babel fails.

(async resolve => {
  const first = await firstFulfilled
  if (first !== client) {
    client.disconnect()
  }
})()

https://astexplorer.net/#/gist/a075864f81454c5da40fca8d55033f7d/d2c126e77cbfae117c868532ea1172c6dc677c62