Always include Promise polyfill for legacy browsers

It is now used by our general code and not just by the conversion
routines, so we need to make sure it is always included for the
old browsers.
This commit is contained in:
Pierre Ossman
2019-11-11 13:36:30 +01:00
committed by Lauri Kasanen
parent d6d875ef3b
commit 23871b42d1
2 changed files with 25 additions and 16 deletions

View File

@@ -31,7 +31,6 @@ module.exports = {
return [ require_path ];
});
},
noCopyOverride: () => {},
},
'commonjs': {
optionsOverride: (opts) => {
@@ -45,7 +44,6 @@ module.exports = {
.then(buf => writeFile(out_path, buf))
.then(() => []);
},
noCopyOverride: () => {},
removeModules: true,
},
'systemjs': {
@@ -55,17 +53,11 @@ module.exports = {
return writeFile(out_path, `SystemJS.import("${ui_path}");`)
.then(() => {
console.log(`Please place SystemJS in ${path.join(script_base_path, 'system-production.js')}`);
// FIXME: Should probably be in the legacy directory
const promise_path = path.relative(base_out_path,
path.join(base_out_path, 'vendor', 'promise.js'));
const systemjs_path = path.relative(base_out_path,
path.join(script_base_path, 'system-production.js'));
return [ promise_path, systemjs_path ];
return [ systemjs_path ];
});
},
noCopyOverride: (paths, no_copy_files) => {
no_copy_files.delete(path.join(paths.vendor, 'promise.js'));
},
},
'umd': {
optionsOverride: (opts) => {