diff --git a/common/changes/@uifabric/webpack-utils/noawait_2018-06-29-17-23.json b/common/changes/@uifabric/webpack-utils/noawait_2018-06-29-17-23.json new file mode 100644 index 0000000000000..50be0dd97dba4 --- /dev/null +++ b/common/changes/@uifabric/webpack-utils/noawait_2018-06-29-17-23.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "@uifabric/webpack-utils", + "comment": "replaced await with promise so this async loader is more IE compatible", + "type": "minor" + } + ], + "packageName": "@uifabric/webpack-utils", + "email": "kchau@microsoft.com" +} \ No newline at end of file diff --git a/packages/webpack-utils/src/fabricAsyncLoader.ts b/packages/webpack-utils/src/fabricAsyncLoader.ts index 4a542deb9680a..61dc95c390c94 100644 --- a/packages/webpack-utils/src/fabricAsyncLoader.ts +++ b/packages/webpack-utils/src/fabricAsyncLoader.ts @@ -50,8 +50,10 @@ module.exports.pitch = function(remainingRequest: string, precedingRequest: stri return [ "import Loadable from 'react-loadable';", `export const ${moduleName} = Loadable({`, - ` loader: async() => (await import(${getMagicComments(options)} ${request})).${moduleName},`, - ` loading: () => null`, + ` loader: function() { return import(${getMagicComments( + options + )} ${request}).then(function(m) { return m.${moduleName}; }); },`, + ` loading: function() { return null; }`, `});` ].join('\n'); };