Switch to es6 again

pull/1440/head
tobspr 2 years ago
parent 781273e91d
commit 80a80c11e6

@ -108,13 +108,8 @@
callbackDone = true;
};
// var scriptEs6 = makeJsTag(bundleSrc, bundleIntegrity);
// scriptEs6.addEventListener("error", loadFallbackJs);
// scriptEs6.addEventListener("load", onJsLoaded);
// document.head.appendChild(scriptEs6);
var scriptTransp = makeJsTag(bundleSrcTranspiled, bundleIntegrityTranspiled);
scriptTransp.addEventListener("error", scriptFail);
scriptTransp.addEventListener("load", onJsLoaded);
document.head.appendChild(scriptTransp);
var scriptEs6 = makeJsTag(bundleSrc, bundleIntegrity);
scriptEs6.addEventListener("error", loadFallbackJs);
scriptEs6.addEventListener("load", onJsLoaded);
document.head.appendChild(scriptEs6);
})();

@ -167,16 +167,16 @@ function gulptasksHTML($, gulp, buildFolder) {
const loadJs = document.createElement("script");
loadJs.type = "text/javascript";
let scriptContent = "";
// scriptContent += `var bundleSrc = '${cachebust("bundle.js")}';\n`;
scriptContent += `var bundleSrc = '${cachebust("bundle.js")}';\n`;
scriptContent += `var bundleSrcTranspiled = '${cachebust(
"bundle-transpiled.js"
)}';\n`;
if (integrity) {
// scriptContent +=
// "var bundleIntegrity = '" +
// computeIntegrityHash(path.join(buildFolder, "bundle.js")) +
// "';\n";
scriptContent +=
"var bundleIntegrity = '" +
computeIntegrityHash(path.join(buildFolder, "bundle.js")) +
"';\n";
scriptContent +=
"var bundleIntegrityTranspiled = '" +
computeIntegrityHash(path.join(buildFolder, "bundle-transpiled.js")) +

@ -86,9 +86,9 @@ function gulptasksJS($, gulp, buildFolder, browserSync) {
gulp.task(
"js." + variant + ".prod",
// ES6 Currently not used
// transpiled currently not used
// gulp.parallel("js." + variant + ".prod.transpiled", "js." + variant + ".prod.es6")
gulp.parallel("js." + variant + ".prod.transpiled")
gulp.parallel("js." + variant + ".prod.es6")
);
} else {
// STANDALONE

Loading…
Cancel
Save