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

Map is not rendered #6

Closed
mapl opened this issue Mar 15, 2020 · 5 comments
Closed

Map is not rendered #6

mapl opened this issue Mar 15, 2020 · 5 comments

Comments

@mapl
Copy link

mapl commented Mar 15, 2020

When executing "yarn dev", the map is not rendered.

Inspecting Firefox dev tools reveals the issue:

ReferenceError: _typeof is not defined ce9db94b-da1f-40bc-ba93-41623c29dfcd:5126:7
Ar blob:http://localhost:1234/ce9db94b-da1f-40bc-ba93-41623c29dfcd:5126
expression blob:http://localhost:1234/ce9db94b-da1f-40bc-ba93-41623c29dfcd:6930
Yn blob:http://localhost:1234/ce9db94b-da1f-40bc-ba93-41623c29dfcd:6947
li blob:http://localhost:1234/ce9db94b-da1f-40bc-ba93-41623c29dfcd:7232
blob:http://localhost:1234/ce9db94b-da1f-40bc-ba93-41623c29dfcd:9258
blob:http://localhost:1234/ce9db94b-da1f-40bc-ba93-41623c29dfcd:15032

My Fix:
A quick fix has been by adding

"browserslist": [
    "last 2 Chrome versions"
]

to the package.json file, the error is gone.

Mapbox-gl doesn't like to be transpiled by parcel.

@francois2metz
Copy link
Member

Hi, thanks for the report.

That's strange, it's already there:

"browsers": "last 2 Firefox versions, last 2 Chrome versions, last 2 Edge versions, last 2 Safari versions"

@mapl
Copy link
Author

mapl commented Mar 15, 2020

You're right. It seems my parcel version (1.12.4) ignores .babelrc. There some known issues. Will investigate this.

@francois2metz
Copy link
Member

I upgraded to babel 7 and moved the browserslist config to the package.json file. Could you check that it works?

@mapl
Copy link
Author

mapl commented Mar 15, 2020

Just cloned the repo again and ran "yarn install" and "yarn run dev".

Works now :)

Thank you!

BTW: would you consider using vue-cli? https://cli.vuejs.org/

@francois2metz
Copy link
Member

Perfect.

About vue-cli, I prefer not using it. I don't see any benefits to learn this new thing.

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