mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:39:05 +08:00
chore:修复编译时的 cfc 链接错误
This commit is contained in:
parent
dc9224bd28
commit
633fd41650
31
fis-conf.js
31
fis-conf.js
@ -755,31 +755,12 @@ if (fis.project.currentMedia() === 'publish') {
|
||||
return contents;
|
||||
}
|
||||
|
||||
return contents
|
||||
.replace(
|
||||
/(\\?(?:'|"))((?:get|post|delete|put)\:)?\/api\/mock2?/gi,
|
||||
function (_, qutoa, method) {
|
||||
return qutoa + (method || '') + `${cfcAddress}/mock2`;
|
||||
}
|
||||
)
|
||||
.replace(
|
||||
/(\\?(?:'|"))((?:get|post|delete|put)\:)?\/api\/sample/gi,
|
||||
function (_, qutoa, method) {
|
||||
return qutoa + (method || '') + `${cfcAddress}/sample`;
|
||||
}
|
||||
)
|
||||
.replace(
|
||||
/(\\?(?:'|"))((?:get|post|delete|put)\:)?\/api\/options/gi,
|
||||
function (_, qutoa, method) {
|
||||
return qutoa + (method || '') + `${cfcAddress}/options`;
|
||||
}
|
||||
)
|
||||
.replace(
|
||||
/(\\?(?:'|"))((?:get|post|delete|put)\:)?\/api\/crud/gi,
|
||||
function (_, qutoa, method) {
|
||||
return qutoa + (method || '') + `${cfcAddress}/crud`;
|
||||
}
|
||||
);
|
||||
return contents.replace(
|
||||
/(\\?(?:'|"))((?:get|post|delete|put)\:)?\/api\/(\w+)/gi,
|
||||
function (_, qutoa, method, path) {
|
||||
return qutoa + (method || '') + `${cfcAddress}/` + path;
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user