From d77ae840d8c1ef679b9bb0507c076230f12b75b3 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 9 May 2019 15:36:16 -0700 Subject: [PATCH] Fix the ES5 adapter for custom panel (#3182) * Fix the ES5 adapter for custom panel * Update custom-panel.ts * Update custom-panel.ts * Update custom-panel.ts --- src/entrypoints/custom-panel.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/entrypoints/custom-panel.ts b/src/entrypoints/custom-panel.ts index 46e3eb2527..d6f0a33d74 100644 --- a/src/entrypoints/custom-panel.ts +++ b/src/entrypoints/custom-panel.ts @@ -22,7 +22,9 @@ let es5Loaded: Promise | undefined; window.loadES5Adapter = () => { if (!es5Loaded) { es5Loaded = Promise.all([ - loadJS(`${__STATIC_PATH__}custom-elements-es5-adapter.js`).catch(), + loadJS( + `${__STATIC_PATH__}/polyfills/custom-elements-es5-adapter.js` + ).catch(), import(/* webpackChunkName: "compat" */ "./compatibility"), ]); } @@ -47,7 +49,9 @@ function initialize(panel: CustomPanelInfo, properties: {}) { let start: Promise = Promise.resolve(); if (!webComponentsSupported) { - start = start.then(() => loadJS("/static/webcomponents-bundle.js")); + start = start.then(() => + loadJS(`${__STATIC_PATH__}/polyfills/webcomponents-bundle.js`) + ); } if (__BUILD__ === "es5") {