mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Switch to es6 again
This commit is contained in:
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);
|
||||
})();
|
||||
|
10
gulp/html.js
10
gulp/html.js
@ -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…
Reference in New Issue
Block a user