Skip to content

Error when minifying code with import. (e.g. import.meta) #819

@VastBlast

Description

@VastBlast

When minifying code containing import. (such as import.meta), minify throws an error.

For example if you give it:

import.meta;

You get this error:

expected String, Identifier, *, or { instead of . in import statement on line 1 and column 7
    1: import.meta;
             ^

However, similar syntax with any other identifier works fine. For example:

hellothere.meta;

produces:

hellothere.meta

I also believe the test here should be simplified from (import.meta) to import.meta rather than being kept the same. Is there a reason for keeping the parenthesis?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions