Skip to content

Commit

Permalink
👻 fix: ghost dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Wxh16144 committed Apr 30, 2024
1 parent e524190 commit 911cf32
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/features/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ 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'))),
},
});

Expand Down
1 change: 1 addition & 0 deletions src/features/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ export default DumiLoading;
api.config.themeConfig,
),
),
rc_util: winPath(path.dirname(require.resolve('rc-util'))),
_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 911cf32

Please sign in to comment.