For a signage project we need developed a player for LG signage devices. At the time we focused on support for WebOs Signage 4.0 which uses Chrome 53 engine. However now the request arises to also support WebOs Signage 3.2 which uses Chrome 38.
When using modern JavaScript and the Vue.js 3 library we get things working when compiling code for Chrome 53 (which is in LG Web OS 4.x) but not for Chrome 38.
Testing in that browser isn't easy. I can't find a way to install Chrome 38. It is possible to test on browserstack.com so I purchased a month account for that site.
When troubleshooting there was an error in the code below on line 4 (importing vue).
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var babel_polyfill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-polyfill */ "./node_modules/babel-polyfill/lib/index.js");
/* harmony import */ var babel_polyfill__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_polyfill__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
/* harmony import */ var _lg_player_App__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lg-player/App */ "./resources/js/lg-player/App.vue");
/* harmony import */ var _css_lg_player_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../css/lg-player.css */ "./resources/css/lg-player.css");
However when setting these options in webpack and defining browserslist to Chrome 38 the error moves to line 5 (importing the App.vue SFC).
return {
module: {
rules: [
{
test: /\.js?$/,
use: [{
loader: 'babel-loader'
}]
},
{
test: /\.vue$/,
loader: 'vue-loader'
}
]
},
I would assume that the vue single file component isn't transpiled correctly.
I also read in the docs for Vue that it only works in ES2015 supported browsers (https://vuejs.org/about/faq.html#what-browsers-does-vue-support) and apparently some things can't even be transpiled. Obviously Chrome 38 doesn't support ES2015. But what confuses me is that with the babel-loader activated it passes line 4 and moves on to line 5. So I assume the line to import vue was successful but the import of App.vue wasn't. With the code above the script part of the .vue files should be transpiled correctly so why isn't that running in the browser...
I've tried some polyfill solutions (polyfill.io, https://laravel-mix.com/extensions/polyfill, ...) as well but unsuccessful.
Can anyone confirm that my attempts to make Vue3 code work in Chrome 38 are useless? Or am I not using the correct technique to make it happen?
Alternative is to build a new player with "simpler" JavaScript or "older" libraries I suppose.