meteor / meteor/ecmascript-runtime

Problem with let in safari

Open
#9 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Hi, im having some trouble with transpiling my code to ES5. When i build with --production flag my meteor application it runs OK on chrome and firefox, but when i run it on safari it returns this error:
"SyntaxError: Cannot declare a let variable twice: 'e'."
In this place of the code ( which is some meteor code )
![image](https://user-images.githubusercontent.com/11761278/28125916-6c160d5e-66fe-11e7-8927-34aea5968567.png)

I know this error is a bug already reported from safari, but my question is: the let statement is a ES2015 feature, why is it not being transpiled to a var?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the Meteor application’s production build with the --production flag and inspect the generated code shown in the report. Compare the Safari failure with the Chrome and Firefox results, then trace why a let declaration remains in the ES5 output. Done means the transpilation behavior is explained and a focused fix or confirmed upstream limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.