Skip to content

Dynamic import parsing throws 'import' and 'export' may only appear at the top level #809

@xsurge83

Description

@xsurge83

The following change is throwing an error for dynamic module imports.
image. Setting topLevel flag to null in parseStatement function which raises the

"'import' and 'export' may only appear at the top level"

Dynamic module import use to work in 5.7.3 with same settings.

I'm using angular-cli to compile my app which updated webpack to 4.29.9 with new acorn changes. Not sure if this is an angular-cli, webpack or acorn issue but after debugging I noticed these differences in acorn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions