Skip to content

Commit

Permalink
fix(preset-built-in): avoid phantom dependency (#11221)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Jun 1, 2023
1 parent 48ec824 commit 3e8eddf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
3 changes: 1 addition & 2 deletions packages/preset-built-in/src/plugins/features/analyze.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { BundlerConfigType } from '@umijs/types';
import { IApi } from 'umi';
import { BundlerConfigType, IApi } from '@umijs/types';

export default (api: IApi) => {
api.describe({
Expand Down
9 changes: 4 additions & 5 deletions packages/preset-built-in/src/plugins/features/fastRefresh.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { BundlerConfigType, IApi, utils } from 'umi';

const { createDebug } = utils;

const debug = createDebug('umi:preset-build-in:fastRefresh');
import { BundlerConfigType, IApi } from '@umijs/types';

export default (api: IApi) => {
const { createDebug } = api.utils;
const debug = createDebug('umi:preset-build-in:fastRefresh');

/**
* enable by default, back up using view rerender
* ssr can't work with fastRefresh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IApi, utils } from 'umi';
import { IApi } from '@umijs/types';

export default (api: IApi) => {
const { deepmerge } = utils;
const { deepmerge } = api.utils;
api.describe({
key: 'forkTSChecker',
config: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { winPath } from '@umijs/utils';
import { resolve } from 'path';
import { IApi } from 'umi';
import { IApi } from '@umijs/types';
import { getMfsuPath, normalizeReqPath } from './mfsu';

test('functions: get mfsu path', () => {
Expand Down
3 changes: 1 addition & 2 deletions packages/preset-built-in/src/plugins/features/mfsu/mfsu.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { BundlerConfigType } from '@umijs/types';
import { BundlerConfigType, IApi } from '@umijs/types';
import { chalk, createDebug, mkdirp } from '@umijs/utils';
import assert from 'assert';
import { existsSync, readFileSync } from 'fs';
import mime from 'mime';
import { dirname, join, parse } from 'path';
import { IApi } from 'umi';
import webpack from 'webpack';
import BabelImportRedirectPlugin from './babel-import-redirect-plugin';
import BabelPluginAutoExport from './babel-plugin-auto-export';
Expand Down

0 comments on commit 3e8eddf

Please sign in to comment.