{/if}
</script>
-{js application='wcf' lib='polyfill' file='promise' core='true'}
+{js application='wcf' lib='polyfill' file='promise' bundle='WoltLabSuite.Core' core='true'}
{js application='wcf' file='require' bundle='WoltLabSuite.Core' core='true' hasTiny=true}
{js application='wcf' file='require.config' bundle='WoltLabSuite.Core' core='true' hasTiny=true}
{js application='wcf' file='require.linearExecution' bundle='WoltLabSuite.Core' core='true' hasTiny=true}
let configFile = "require.build.js";
let outFilename = require(process.cwd() + `/${configFile}`).out;
+ const promisePolyfill = fs.readFileSync("./3rdParty/polyfill/promise.min.js");
+
[true, false].forEach(COMPILER_TARGET_DEFAULT => {
let overrides = "uglify2.compress.global_defs.COMPILER_TARGET_DEFAULT=" + (COMPILER_TARGET_DEFAULT ? "true" : "false");
if (!COMPILER_TARGET_DEFAULT) {
stdio: [0, 1, 2]
});
console.timeEnd(outFilename);
+
+ // prepend the promise polyfill
+ let content = `// promise.min.js\n${promisePolyfill}\n\n// ${outFilename}\n` + fs.readFileSync(outFilename);
+ fs.writeFileSync(outFilename, content);
});
}
var COMPILER_TARGET_DEFAULT = true;
</script>
+ {js application='wcf' lib='polyfill' file='promise' bundle='WoltLabSuite.Core' core='true'}
{js application='wcf' file='require' bundle='WoltLabSuite.Core' core='true'}
{js application='wcf' file='require.config' bundle='WoltLabSuite.Core' core='true'}
{js application='wcf' file='require.linearExecution' bundle='WoltLabSuite.Core' core='true'}