- 修改 build prod 文件
This commit is contained in:
parent
c550340c7c
commit
b539420d6f
@ -26,8 +26,17 @@ module.exports = function(config) {
|
|||||||
for (const key in config) {
|
for (const key in config) {
|
||||||
if (/->/.test(key)) {
|
if (/->/.test(key)) {
|
||||||
const keys = key.toString().split('->');
|
const keys = key.toString().split('->');
|
||||||
const source = keys[0].trim();
|
|
||||||
const target = keys[1].trim();
|
let source;
|
||||||
|
let target;
|
||||||
|
if (keys.length <= 1) {
|
||||||
|
// 没有 ->
|
||||||
|
source = key;
|
||||||
|
target = config.target;
|
||||||
|
} else {
|
||||||
|
source = keys[0].trim();
|
||||||
|
target = keys[1].trim();
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof config !== 'object') {
|
if (typeof config !== 'object') {
|
||||||
console.log(
|
console.log(
|
||||||
|
Loading…
Reference in New Issue
Block a user