Skip to content

Commit

Permalink
feat: alita loading
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohuoni committed Jun 6, 2022
1 parent b6c44d7 commit 3032231
Show file tree
Hide file tree
Showing 3 changed files with 196 additions and 0 deletions.
179 changes: 179 additions & 0 deletions packages/alita/assets/bundle-status.html

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions packages/alita/src/features/alitaloading.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { cheerio } from '@umijs/utils';
import { readFileSync } from 'fs';
import { join } from 'path';
import { IApi } from 'umi';

const assetsDir = join(__dirname, '../../assets');

export default (api: IApi) => {
api.register({
key: 'modifyDevToolLoadingHTML',
fn: () =>
cheerio.load(
readFileSync(join(assetsDir, 'bundle-status.html'), 'utf-8'),
),
});
};
1 change: 1 addition & 0 deletions packages/alita/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default (api: IApi) => {
});
const plugins = [
require.resolve('./features/config/alitaconfig'),
require.resolve('./features/alitaloading'),
require.resolve('./features/apptype'),
require.resolve('./features/qrcodeterminal'),
require.resolve('./commands/generate/pages'),
Expand Down

0 comments on commit 3032231

Please sign in to comment.