201-created / bodega-glimmer

glimmerized version of bodega
13 stars 3 forks source link

does not work on Safari 10 #4

Closed bantic closed 7 years ago

bantic commented 7 years ago

Glimmer uses uglify-es and the default configuration outputs ES code that triggers a Safari bug related to block scoping. See https://github.com/mishoo/UglifyJS2/issues/1753. The bug in Safari affects Safari 10 but is fixed in the next release. See: https://bugs.webkit.org/show_bug.cgi?id=171041

The standard production build results in this error in Safari 10:

SyntaxError: Cannot declare a let variable twice: 'e'.

To fix, use the safari10 mangle setting in uglify:

uglify: {
  mangle: {
    safari10: true
  }
}

image