build-logs
v0.0.12
Published
基于webpack plugin构建日志信息打印的库
Downloads
26
Readme
build-logs
基于webpack plugin构建日志信息打印的库
使用说明
1. 下载包
npm i -D build-logs
2. webpack配置
webpack.config.js中
const BuildLogsPlugin = require('build-logs')
plugins: [
new BuildLogsPlugin({
isShowLibInfo: true,
projectName: '待办中心',
extra: [
{
label: '构建环境',
key: 'REACT_APP_ENV'
}
],
styles: ['color: #fff', 'padding: 2px 5px']
}),
...
]
参数列表
|options |description |type |default| | --- | --- | --- | --- | |isShowLibInfo? |是否显示当前库信息 |boolean |false| |projectName? |项目名称,默认取package.json里的name字段。 |string |package.name| |extra? |额外需要显示的字段,需要是env里面有的字段 |string []| []| |styles? |自定义样式 |string[] |defaultStyle|