Skip to content

Dynamic import is not supported due to acorn #6

@alexkuc

Description

@alexkuc

Hi!

It appears that dynamic import, i.e. import(...) is not supported by this loader due to acorn not supporting it. When trying to use dynamic import, the following error is generated:

SyntaxError: Unexpected token (1:6)

To enable dynamic import, two solutions I found is acorn-dynamic-import and acorn-stage3.

Unfortunately, both solutions require version 6.x.x of acorn but currently used version by loader and F7 is 7.x.x.

I have tried forking this loader and implement a fix for this issue but I was unsuccessful.

I was getting stuck at the error:

acorn-private-class-elements does not support mixing different acorn copies

So I decided to leave this bug/message here in case someone else tries to use dynamic import and experience the same issue.

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