I can't run Quasar 0.16 on iOS 9 with Safari 9



  • I got

    SyntaxError: Unexpected use of reserved word 'let' in strict mode
    

    I know that it relates to ES5 and Babel, but all that I tried didn’t make the success.

    Does anybody know what exactly I must change to make this works?



  • Let’s see the code where this error is coming from.



  •  "/VnK": function (t, e, n) {
            "use strict";
            n.d(e, "a", function () {
                return u
            });
            let r = Object.prototype.toString, i = Object.prototype.hasOwnProperty, o = {};
    
            function a(t) {
                return null === t ? String(t) : o[r.call(t)] || "object"
            }
    
            function s(t) {
                if (!t || "object" !== a(t)) return !1;
                if (t.constructor && !i.call(t, "constructor") && !i.call(t.constructor.prototype, "isPrototypeOf")) return !1;
                let e;
                for (e in t) ;
                return void 0 === e || i.call(t, e)
            }
    
            function u() {
                let t, e, n, r, i, o, c = arguments[0] || {}, l = 1, h = arguments.length, d = !1;
                for ("boolean" === typeof c && (d = c, c = arguments[1] || {}, l = 2), Object(c) !== c && "function" !== a(c) && (c = {}), h === l && (c = this, l--); l < h; l++) if (null !== (t = arguments[l])) for (e in t) n = c[e], r = t[e], c !== r && (d && r && (s(r) || (i = "array" === a(r))) ? (i ? (i = !1, o = n && "array" === a(n) ? n : []) : o = n && s(n) ? n : {}, c[e] = u(d, o, r)) : void 0 !== r && (c[e] = r));
                return c
            }
    
            "Boolean Number String Function Array Date RegExp Object".split(" ").forEach(t => {
                o["[object " + t + "]"] = t.toLowerCase()
            })
        },
    

    I tried to change let to var manualy, but broke js and got wrong token >
    P.S.: This wrong token is also there in last lines. So it means that js is still in es6, not es5.

    You push me on god way. I got minimized js, I’ll try to fix it manualy again in formated mode.
    I thought that it is Babel setup problem, and I need to add something special to it. I’ve tried targets: { 'safari': 9 } but it gives nothing.



  • This post is deleted!


  • @Hawkeye64 Thank to you for your other answer (Upgrading v0.16 to v0.17) it helps me somehow. 🙂
    I just added new quasar-cli@0.17.19 to dependencies and Babel works well now.



  • If you are interested in updating to Babel 7.x (which I have done), there is a great tool here: https://github.com/babel/babel-upgrade