Creating a new glimmer app from the blueprint and building for production outputs code that contains a let declaration shadowing a function parameter. This is syntactically valid ES but Safari 10 has a bug related to this and complains "Cannot declare a let variable twice".
Creating a new glimmer app from the blueprint and building for production outputs code that contains a
let
declaration shadowing a function parameter. This is syntactically valid ES but Safari 10 has a bug related to this and complains "Cannot declare a let variable twice".This is the Safari bug (it's fixed and in Safari Technology Preview): https://bugs.webkit.org/show_bug.cgi?id=171041
uglify-es
has a workaround for this bug — they added asafari10
mangle option. Adding the following to theember-cli-build.js
fixes the issue:The steps I took to reproduce:
Visiting localhost:4200 in Safari 10 shows the javascript error in the console, and the app doesn't load.