mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
feat: 修复错误的路径
This commit is contained in:
parent
1a1ae0cf11
commit
1f451393b0
@ -3,9 +3,7 @@ import { join } from 'path';
|
||||
import { winPath } from '@umijs/utils';
|
||||
import { runtimePath } from '../../../utils/constants';
|
||||
|
||||
export function importsToStr(
|
||||
imports,
|
||||
) {
|
||||
export function importsToStr(imports) {
|
||||
return imports.map((imp) => {
|
||||
const { source, specifier } = imp;
|
||||
if (specifier) {
|
||||
@ -48,14 +46,14 @@ export default function (api) {
|
||||
key: 'addEntryImportsAhead',
|
||||
type: api.ApplyPluginsType.add,
|
||||
initialValue: []
|
||||
}),
|
||||
})
|
||||
).join('\r\n'),
|
||||
imports: importsToStr(
|
||||
await api.applyPlugins({
|
||||
key: 'addEntryImports',
|
||||
type: api.ApplyPluginsType.add,
|
||||
initialValue: []
|
||||
}),
|
||||
})
|
||||
).join('\r\n')
|
||||
})
|
||||
});
|
||||
|
@ -22,7 +22,7 @@ export default (api) => {
|
||||
});
|
||||
|
||||
const namespace = 'plugin-request';
|
||||
const requestTemplate = readFileSync(join(__dirname, 'template', 'request.ts'), 'utf-8');
|
||||
const requestTemplate = readFileSync(join(__dirname, 'template', 'request.js'), 'utf-8');
|
||||
api.onGenerateFiles(() => {
|
||||
// 文件写出
|
||||
const { dataField = '', messageUI } = api.config.request;
|
||||
|
Loading…
x
Reference in New Issue
Block a user