mirror of
https://github.com/nocobase/nocobase
synced 2024-11-18 01:25:42 +00:00
18 lines
412 B
TypeScript
18 lines
412 B
TypeScript
|
import { IApi } from 'umi';
|
||
|
|
||
|
export default (api: IApi) => {
|
||
|
api.addRuntimePlugin(() => ['../plugin-routerBase/runtime.ts']);
|
||
|
api.addRuntimePluginKey(() => ['routerBase']);
|
||
|
|
||
|
api.onGenerateFiles(() => {
|
||
|
api.writeTmpFile({
|
||
|
path: '../plugin-routerBase/runtime.ts',
|
||
|
content: `
|
||
|
export function modifyContextOpts(memo) {
|
||
|
return { ...memo, basename: window.routerBase };
|
||
|
};
|
||
|
`,
|
||
|
});
|
||
|
});
|
||
|
};
|