提交 f34300b8 编写于 作者: A Alex Dima

Remove dynamic require call in the ESM case

上级 219e8b7d
......@@ -529,6 +529,7 @@ export abstract class BaseEditorSimpleWorker {
}
return TPromise.as(methods);
}
// ESM-comment-begin
return new TPromise<any>((c, e) => {
require([moduleId], (foreignModule: { create: IForeignModuleFactory }) => {
this._foreignModule = foreignModule.create(ctx, createData);
......@@ -544,6 +545,11 @@ export abstract class BaseEditorSimpleWorker {
}, e);
});
// ESM-comment-end
// ESM-uncomment-begin
// return TPromise.wrapError(new Error(`Unexpected usage`));
// ESM-uncomment-end
}
// foreign method request
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册