es6-css-minify icon indicating copy to clipboard operation
es6-css-minify copied to clipboard

Error unexpected token: punc (.) on optional chaining

Open kimlimjustin opened this issue 5 years ago • 4 comments

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

kimlimjustin avatar Feb 09 '21 07:02 kimlimjustin

I have the exact same issue.

OS: Xubuntu Linux
Version: 20.04

gabrielmachts avatar Jun 08 '21 17:06 gabrielmachts

same

rmm443 avatar Aug 16 '21 16:08 rmm443

same

Erik-Schlegel avatar Oct 12 '21 20:10 Erik-Schlegel

same

Slashdacoda avatar Mar 07 '23 09:03 Slashdacoda