提交 b539420d authored 作者: sin's avatar sin

- 修改 build prod 文件

上级 c550340c
...@@ -26,8 +26,17 @@ module.exports = function(config) { ...@@ -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(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论