diff --git a/samples/react-script-editor/src/webparts/scriptEditor/1x1.png b/samples/react-script-editor/src/webparts/scriptEditor/1x1.png new file mode 100644 index 000000000..4b1bad2b7 Binary files /dev/null and b/samples/react-script-editor/src/webparts/scriptEditor/1x1.png differ diff --git a/samples/react-script-editor/src/webparts/scriptEditor/ScriptEditorWebPart.ts b/samples/react-script-editor/src/webparts/scriptEditor/ScriptEditorWebPart.ts index 6534afe5a..20cfb64d6 100644 --- a/samples/react-script-editor/src/webparts/scriptEditor/ScriptEditorWebPart.ts +++ b/samples/react-script-editor/src/webparts/scriptEditor/ScriptEditorWebPart.ts @@ -36,11 +36,7 @@ export default class ScriptEditorWebPart extends BaseClientSideWebPartthis.context.manifest).loaderConfig.internalModuleBaseUrls[0]; - if (scriptRoot.indexOf("localhost") != -1) { - scriptRoot += "dist/"; - } - const editorPopUp: any = await SPComponentLoader.loadScript(scriptRoot + '/editor-pop-up.min.js', { globalExportsName: "EditorPopUp" }); + const editorPopUp: any = await SPComponentLoader.loadScript(this.getScriptRoot() + '/editor-pop-up.min.js', { globalExportsName: "EditorPopUp" }); const element: React.ReactElement = React.createElement( editorPopUp.default, { @@ -53,6 +49,15 @@ export default class ScriptEditorWebPart extends BaseClientSideWebPart