From 671f0b83be5cf9f9b6b1d667d41fd7779896a21a Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Thu, 27 Feb 2020 03:59:33 +1100 Subject: Bundles can be sync or async based on top level await (#4124) Previously, bundles always utilised top level await, even if the bundled modules didn't require top level await. Now, analysis of the bundle is done and if none of the bundled modules are asynchronously executed, then the bundle as a whole will be synchronously executed. Fixes #4055 Fixes #4123 --- cli/tests/bundle.test.out | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cli/tests') diff --git a/cli/tests/bundle.test.out b/cli/tests/bundle.test.out index 1379eb7e5..778754c34 100644 --- a/cli/tests/bundle.test.out +++ b/cli/tests/bundle.test.out @@ -1,6 +1,5 @@ [WILDCARD] -let System; -let __inst; +let System, __inst, __inst_s; [WILDCARD] (() => { [WILDCARD] @@ -16,7 +15,7 @@ System.register("mod1", ["subdir2/mod2"], function (exports_3, context_3) { [WILDCARD] }); -const __exp = await __inst("mod1"); +const __exp = __inst_s("mod1"); export const returnsHi = __exp["returnsHi"]; export const returnsFoo2 = __exp["returnsFoo2"]; export const printHello3 = __exp["printHello3"]; -- cgit v1.2.3