enact
enact copied to clipboard
Enact pack command doesn't build project to es5 and that cause errors at older TVs
Rendering issue
Description
Enact pack and pack -p commands doesn't convert final bundle to ES5. It cause render errors at Older TV versions such as webOS TV 4.x (2018-2019).
Environment
LG Smart TV (2018-2019) and Chromium 53 on Windows
Enact version: latest
Reproduction Code
I got this code pieces from main.js file In dist after run npm run pack -p
command. Which is not supported by older chromium versions
async resolveData(signal) {
let aborted = false;
if (!this.done) {
let onAbort = () => this.cancel();
signal.addEventListener("abort", onAbort);
aborted = await new Promise(resolve => {
this.subscribe(aborted => {
signal.removeEventListener("abort", onAbort);
if (aborted || this.done) {
resolve(aborted);
}
});
});
}
return aborted;
}
class AbortedDeferredError extends Error {}
const defer = function defer(data, init) {
if (init === void 0) {
init = {};
}
let responseInit = typeof init === "number" ? {
status: init
} : init;
return new DeferredData(data, responseInit);
};
Comments and Screen Shots
The webpack and babel configuration must be modified to build project to es5 to make it supported by any devices.