mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 19:05:51 +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 };
|
||
|
};
|
||
|
`,
|
||
|
});
|
||
|
});
|
||
|
};
|