mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2026-09-11 06:05:41 +08:00
chore: 导出 initGlobalState #AI commit#
This commit is contained in:
parent
60d652b2fe
commit
326df2fc46
@ -36,6 +36,7 @@ export default function (api) {
|
||||
const absMicroAppWithMemoHistoryPath = join(namespace, 'MicroAppWithMemoHistory.jsx');
|
||||
const absRuntimePath = join(namespace, 'runtime.js');
|
||||
const absMasterOptionsPath = join(namespace, 'masterOptions.js');
|
||||
const absQiankunPath = join(namespace, 'qiankun.js');
|
||||
|
||||
api.onGenerateFiles(() => {
|
||||
const HAS_PLUGIN_MODEL = api.hasPlugins(['@fesjs/plugin-model']);
|
||||
@ -60,6 +61,11 @@ export default function (api) {
|
||||
ignore: ['.tpl'],
|
||||
});
|
||||
|
||||
api.writeTmpFile({
|
||||
path: absQiankunPath,
|
||||
content: `export { initGlobalState } from 'qiankun';`,
|
||||
});
|
||||
|
||||
const { main: options } = api.config?.qiankun || {};
|
||||
const masterHistoryType = api.config?.router?.mode || defaultHistoryType;
|
||||
const base = api.config.router?.base;
|
||||
@ -90,4 +96,11 @@ export default function (api) {
|
||||
source: absMicroAppWithMemoHistoryPath,
|
||||
},
|
||||
]);
|
||||
|
||||
api.addPluginExports(() => [
|
||||
{
|
||||
specifiers: ['initGlobalState'],
|
||||
source: absQiankunPath,
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
4
packages/plugin-qiankun/types.d.ts
vendored
4
packages/plugin-qiankun/types.d.ts
vendored
@ -21,4 +21,6 @@ export interface PluginBuildConfig {
|
||||
}
|
||||
|
||||
export const MicroApp: Component;
|
||||
export const MicroAppWithMemoHistory: Component;
|
||||
export const MicroAppWithMemoHistory: Component;
|
||||
|
||||
export { initGlobalState } from 'qiankun';
|
||||
Loading…
x
Reference in New Issue
Block a user