Skip to content

Unexpected token: name «fetch» #571

@kmgdevelopment

Description

@kmgdevelopment

If I try to use fetch like so:

let response = await fetch('https://domain.tld');

Uglify throws this error:

Unexpected token: name «fetch», expected: punc «;». 

This old issue (#499) appears to be similar, but the solution is to use a grunt package that is currently marked as depreciated so ¯\_(ツ)_/¯

I'm using grunt-contrib-uglify version 5.2.1

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