Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/features/derivative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,23 @@ export default (api: IApi) => {

// FIXME: skip prepare plugin since [email protected], because it is not compatible with dumi currently
if (api.isPluginEnable('prepare')) api.skipPlugins(['prepare']);

// skip routeProps plugin since [email protected]
// because dumi support conventional route props by default and it will cause ssr failed
if (api.isPluginEnable('routeProps')) {
api.skipPlugins(['routeProps']);

// FIXME: write a empty routeProps file to avoid umi throw error, should be removed after umi fixed
api.onGenerateFiles({
// make sure before umi generate files
stage: -Infinity,
fn() {
api.writeTmpFile({
noPluginDir: true,
path: 'core/routeProps.js',
content: 'export default {}',
});
},
});
}
};