Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Error unexpected token: punc (.) on optional chaining #118

Open
kimlimjustin opened this issue Feb 9, 2021 · 4 comments
Open

Error unexpected token: punc (.) on optional chaining #118

kimlimjustin opened this issue Feb 9, 2021 · 4 comments

Comments

@kimlimjustin
Copy link

Describe the bug
Error "unexpected token: punc (.)" when minifying JavaScript file which contains optional chaining (?.) syntax

To Reproduce
Steps to reproduce the behavior:

  1. Create a JavaScript file
  2. Add an optional chaining syntax, ex: if(object.key?.otherKey)
  3. Run Minify
  4. There will be an error showing unexpected token: punc (.)

Expected behavior
The JavaScript file is minified correctly

Desktop (please complete the following information):

  • OS: Windows 10 Home Single Language
  • Version: 1909
@gabrielmachts
Copy link

I have the exact same issue.

OS: Xubuntu Linux
Version: 20.04

@rmm443
Copy link

rmm443 commented Aug 16, 2021

same

2 similar comments
@Erik-Schlegel
Copy link

same

@Slashdacoda
Copy link

same

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants