Skip to content

Commit

Permalink
fix: disable mfsu temporarily for windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Nov 20, 2022
1 parent e954bc0 commit 6defb8c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/features/derivative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,14 @@ export default (api: IApi) => {

api.modifyDefaultConfig((memo) => {
if (api.userConfig.mfsu !== false) {
if (fs.existsSync(path.join(api.cwd, 'node_modules', '.pnpm'))) {
if (
fs.existsSync(path.join(api.cwd, 'node_modules', '.pnpm')) ||
process.platform === 'win32'
) {
// FIXME: mfsu compatibility for pnpm and windows
// mfsu normal model will broken in pnpm mode, because dumi exclude client
// files in mfsu mode and umi cannot resolve nested deps from dumi client
// and mfsu will broken on window platform with unknown reason
memo.mfsu = false;
} else {
// only normal mode is supported, because src is not fixed in dumi project, eager mode may scan wrong dir
Expand Down

0 comments on commit 6defb8c

Please sign in to comment.