Skip to content

Commit

Permalink
Revert "Revert "Revert "fix: rc-util cannot resolve bug in pnpm proje…
Browse files Browse the repository at this point in the history
…ct (umijs#2096)"""

This reverts commit 302b8d9.
  • Loading branch information
Wxh16144 committed May 6, 2024
1 parent 1e05a28 commit 2800a17
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/features/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export default (api: IApi) => {
tplPath: require.resolve('../templates/meta/runtime.ts.tpl'),
context: {
deepmerge: winPath(path.dirname(require.resolve('deepmerge/package'))),
rc_util: winPath(path.dirname(require.resolve('rc-util/package'))),
},
});

Expand Down
1 change: 0 additions & 1 deletion src/features/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ export default DumiLoading;
api.config.themeConfig,
),
),
rc_util: winPath(path.dirname(require.resolve('rc-util/package'))),
_2_level_nav_available: api.appData._2LevelNavAvailable,
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/templates/ContextWrapper.ts.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect, useRef } from 'react';
import { useOutlet, history } from 'dumi';
import { warning } from '{{{rc_util}}}';
import { warning } from 'rc-util';
import { SiteContext, type ISiteContext } from '{{{contextPath}}}';
import { components } from '../meta/atoms';
import { locales } from '../locales/config';
Expand Down
2 changes: 1 addition & 1 deletion src/templates/meta/runtime.ts.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { warning } from '{{{rc_util}}}';
import { warning } from 'rc-util';
import deepmerge from '{{{deepmerge}}}';
import { getRouteMetaById } from './exports';

Expand Down

0 comments on commit 2800a17

Please sign in to comment.