Skip to content

crash on dynamic import with variable #200

@fisker

Description

@fisker

code

function f() { import(foo) }

error

TypeError: Cannot read property 'indexOf' of undefined
...
      at stripImportPathParams (lib\util\strip-import-path-params.js:4:1335)
      at ExportAllDeclaration,ExportNamedDeclaration,ImportDeclaration,ImportExpression (lib\util\visit-import.js:15:871)

there is no sourceNode.value for this line

const name = sourceNode && stripImportPathParams(sourceNode.value)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions