Misplaced <meta charset="utf-8"> fun


#1

Just spend half a day figuring out this exception (on fresh @vue/cli with all updates, basic widget app displaying sample text ‘vue-custom-element’):

vue.runtime.esm.js:495 Uncaught SyntaxError: Invalid regular expression: /[^a-zA-Z·À-ÖØ-öø-ͽͿ-῿‌-‍‿-⁀⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�.$_\d]/: Range out of order in character class
at new RegExp (<anonymous>)
at Object.<anonymous> (vue.runtime.esm.js:495)
at Object.2b0e (vue.runtime.esm.js:8330)
at i (bootstrap:78)
at Module.56d7 (bootstrap:151)
at i (bootstrap:78)
at Object.0 (bootstrap:151)
at i (bootstrap:78)
at n (bootstrap:45)
at bootstrap:151
(anonymous) @ vue.runtime.esm.js:495
2b0e @ vue.runtime.esm.js:8330
i @ bootstrap:78
56d7 @ bootstrap:151
i @ bootstrap:78
0 @ bootstrap:151
i @ bootstrap:78
n @ bootstrap:45
(anonymous) @ bootstrap:151
(anonymous) @ bootstrap:151

10

Turns out, that happens when “<meta charset=“utf-8”>” tag is missing or is not the first “<meta>” declaration. I hope this helps anyone with legacy (php) applications!