Skip to content

Parsing error: Unexpected token when <= in computed object key #1286

@JamieDixon

Description

@JamieDixon

Can you reproduce the problem with latest npm?

Yes

Description

Using [email protected] and [email protected], computed object keys that contain <= are throwing a Parsing error: Unexpected token.

screen shot 2016-12-17 at 13 48 12

Expected behavior

The code should work to produce an object with duplicated keys like:

const map = {
   true: -90,
   true: -20,
   false: -10,
   false: 0
}

Actual behavior

Parsing error: Unexpected token

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected): [email protected]
  2. node -v: v6.0.0
  3. npm -v: 3.8.6

Then, specify:

  1. Operating system: OS X El Capitan v10.11.6
  2. Browser and version: N/A (Issue in terminal not browser)

Reproducible Demo

https://github.com/JamieDixon/cra-build-issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions