diff --git a/packages/core/client/src/application/Application.tsx b/packages/core/client/src/application/Application.tsx index 6367e6933..f3dd52e00 100644 --- a/packages/core/client/src/application/Application.tsx +++ b/packages/core/client/src/application/Application.tsx @@ -33,7 +33,7 @@ import { WebSocketClient, WebSocketClientOptions } from './WebSocketClient'; declare global { interface Window { - tbDefine: RequireJS['define']; + define: RequireJS['define']; } } @@ -132,7 +132,8 @@ export class Application { private initRequireJs() { this.requirejs = getRequireJs(); defineGlobalDeps(this.requirejs); - window.tbDefine = this.requirejs.define; + window.define = this.requirejs.define; + window.require = this.requirejs.require; } private addDefaultProviders() { diff --git a/packages/core/client/src/application/utils/remotePlugins.ts b/packages/core/client/src/application/utils/remotePlugins.ts index 95eca9604..17ea0adbf 100644 --- a/packages/core/client/src/application/utils/remotePlugins.ts +++ b/packages/core/client/src/application/utils/remotePlugins.ts @@ -8,7 +8,7 @@ import type { RequireJS } from './requirejs'; */ export function defineDevPlugins(plugins: Record) { Object.entries(plugins).forEach(([packageName, plugin]) => { - window.tbDefine(`${packageName}/client`, () => plugin); + window.define(`${packageName}/client`, () => plugin); }); } @@ -16,7 +16,7 @@ export function defineDevPlugins(plugins: Record) { * @internal */ export function definePluginClient(packageName: string) { - window.tbDefine(`${packageName}/client`, ['exports', packageName], function (_exports: any, _pluginExports: any) { + window.define(`${packageName}/client`, ['exports', packageName], function (_exports: any, _pluginExports: any) { Object.defineProperty(_exports, '__esModule', { value: true, });