1
This commit is contained in:
@@ -119,18 +119,15 @@ module.exports = {
|
|||||||
const now = new Date()
|
const now = new Date()
|
||||||
const updateTime = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')} ${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}:${String(now.getSeconds()).padStart(2, '0')}`
|
const updateTime = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')} ${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}:${String(now.getSeconds()).padStart(2, '0')}`
|
||||||
return [
|
return [
|
||||||
'/*',
|
'admin-framework v1.0.0',
|
||||||
' * admin-framework v1.0.0',
|
'通用后台管理系统框架 - 包含系统功能、登录、路由管理、布局等',
|
||||||
' * 通用后台管理系统框架 - 包含系统功能、登录、路由管理、布局等',
|
'',
|
||||||
' * ',
|
'作者: light',
|
||||||
' * 作者: light',
|
'更新时间: ' + updateTime,
|
||||||
' * 更新时间: ' + updateTime,
|
'',
|
||||||
' * ',
|
'Copyright (c) ' + now.getFullYear()
|
||||||
' * Copyright (c) ' + now.getFullYear(),
|
|
||||||
' */'
|
|
||||||
].join('\n')
|
].join('\n')
|
||||||
},
|
},
|
||||||
raw: true, // 使用原始字符串,不添加额外的注释符号
|
|
||||||
entryOnly: true // 只在入口文件顶部添加
|
entryOnly: true // 只在入口文件顶部添加
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
@@ -147,7 +144,17 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: true
|
minimize: true,
|
||||||
|
minimizer: [
|
||||||
|
new (require('terser-webpack-plugin'))({
|
||||||
|
terserOptions: {
|
||||||
|
format: {
|
||||||
|
comments: /^!|@preserve|@license|@cc_on|admin-framework|作者/i // 保留特殊注释
|
||||||
|
}
|
||||||
|
},
|
||||||
|
extractComments: false // 不提取注释到单独文件
|
||||||
|
})
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user