Skip to content

Commit

Permalink
chore: code style
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohuoni committed Jul 31, 2024
1 parent 4ee0336 commit 70a6366
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions packages/alita/src/features/compatibleMako.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ import { dirname } from 'path';
export default (api: IApi) => {
// 强制关闭
if (api.userConfig.mako !== false) {
// https://github.com/umijs/mako/issues/979
const version = require(`${dirname(
require.resolve('pdfjs-dist/package.json'),
)}/package.json`).version;
if (version === '2.1.266') {
api.modifyConfig((memo) => {
// 可能通过内置默认开启
if (api.config.mako) {
api.modifyConfig((memo) => {
// 可能通过内置默认开启
if (api.config.mako) {
// https://github.com/umijs/mako/issues/979
const version = require(`${dirname(
require.resolve('pdfjs-dist/package.json'),
)}/package.json`).version;
if (version === '2.1.266') {
memo.alias['pdfjs-dist'] = dirname(
require.resolve('@lingxiteam/pdfjs-dist/package.json'),
);
}
return memo;
});
}
}
return memo;
});
}
};

0 comments on commit 70a6366

Please sign in to comment.