Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected token issue after upgrading to mapbox-gl 2.6.0 #11288

Closed
ghc20 opened this issue Nov 16, 2021 · 4 comments
Closed

Unexpected token issue after upgrading to mapbox-gl 2.6.0 #11288

ghc20 opened this issue Nov 16, 2021 · 4 comments

Comments

@ghc20
Copy link

ghc20 commented Nov 16, 2021

We have set up a script to compile the mapbox-gl library with our Angular 7+ app on production. The script worked correctly with any mapbox-gl version before 2.6.0.

Steps to Trigger Behavior

  1. Upgraded mapbox-gl from 2.5.1 to 2.6.0
  2. Compiled mapbox-gl 2.6.0 with our Angular app using systemjs-builder
  3. The following error was thrown:

image

  1. Rolling back mapbox-gl to 2.5.1 resolved the issue
@ryanhamley
Copy link
Contributor

Do you use a browserslist in your setup?

@ghc20
Copy link
Author

ghc20 commented Nov 16, 2021

@ryanhamley, no, we did not use browserslist.

@ryanhamley
Copy link
Contributor

Out of curiosity, what version of SystemJS are you using? I'm not very familiar with the project, but when I look up systemjs-builder, I find an archived project that doesn't appear set up for handling Object spread syntax ({...foo}). The newer versions of SystemJS however do seem to be able to handle this syntax. I'm just trying to understand what's causing this issue so we can address it to the best of our ability.

The issue seems to be the introduction of the Object spread notation in v2.6's projection code. This is a duplicate of #11266 so I'm going to close this to consolidate discussion in that earlier ticket.

@ghc20
Copy link
Author

ghc20 commented Nov 18, 2021

@ryanhamley, thank you very much for the hint. We are using an old version of SystemJS since the new one does not take System.config function which is used in our compiling program. I need to investigate if we can upgrade to the new SystemJS.

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

No branches or pull requests

2 participants