"SyntaxError: Cannot declare a let variable twice: 'e'" when using vue.global.prod.js in Safari 10 (iOS 10)
Version
3.0.2
Reproduction link
https://codepen.io/horseluke/pen/LYZxGrv
Steps to reproduce
- Create blank html file, include vue.global.prod.js by using script tag
- Run it in Safari 10 (iOS 10)
- Create another blank html file, but this time include vue.global.js by using script tag
- Run it in Safari 10 (iOS 10)
What is expected?
Both step 2 and step 4 are work as all.
What is actually happening?
Step 2 run failed. It will throw "SyntaxError: Cannot declare a let variable twice: 'e'. vue@3.0.2/vue.global.prod.js:1:0"
Step 4 works OK.
There is a bug on Safari 10 (iOS 10). In Vue 3.x, Minified js file will trigger this problem.
More detail and References can be found here:
Thanks although I'm not sure there is much we can do here apart from manually patching the generated file and publishing a new patch. A better fix would be to change the minifier behavior
@posva after apply patch https://github.com/vuejs/vue-next/pull/2472 and rebuild from master branch, this issue resolved. Thanks!