Skip to content

Commit 5013565

Browse files
authored
fix: workaround for ssr failed since [email protected] (#1503)
1 parent 7026ff4 commit 5013565

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/features/derivative.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,4 +217,23 @@ export default (api: IApi) => {
217217

218218
// FIXME: skip prepare plugin since [email protected], because it is not compatible with dumi currently
219219
if (api.isPluginEnable('prepare')) api.skipPlugins(['prepare']);
220+
221+
// skip routeProps plugin since [email protected]
222+
// because dumi support conventional route props by default and it will cause ssr failed
223+
if (api.isPluginEnable('routeProps')) {
224+
api.skipPlugins(['routeProps']);
225+
226+
// FIXME: write a empty routeProps file to avoid umi throw error, should be removed after umi fixed
227+
api.onGenerateFiles({
228+
// make sure before umi generate files
229+
stage: -Infinity,
230+
fn() {
231+
api.writeTmpFile({
232+
noPluginDir: true,
233+
path: 'core/routeProps.js',
234+
content: 'export default {}',
235+
});
236+
},
237+
});
238+
}
220239
};

0 commit comments

Comments
 (0)