From 61bfb5f8a6c9009e48c9d86e44314ff239b1c8be Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 30 May 2018 11:25:17 +0200 Subject: [PATCH] Fixes #8: Avoid arrow functions in generated code --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 3d4fc99e..c183b840 100644 --- a/index.js +++ b/index.js @@ -95,7 +95,7 @@ function createLoaderRules(languages, features, workers, publicPath) { [label]: `${publicPath ? `${stripTrailingSlash(publicPath)}/` : ''}${output}`, }), {}); const globals = { - 'MonacoEnvironment': `((paths) => ({ getWorkerUrl: (moduleId, label) => paths[label] }))(${ + 'MonacoEnvironment': `(function (paths) { return { getWorkerUrl: function (moduleId, label) { return paths[label]; } }; } )(${ JSON.stringify(workerPaths, null, 2) })`, };