1.0.2 • Published 1 year ago

@renzp/build-info-webpack-plugin v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@renzp/build-info-webpack-plugin

一款将打包信息打印在控制台的webpack插件

Install

npm i @renzp/build-info-webpack-plugin -D 

Usage

webpack.config.js

import

import BuildInfoWebpackPlugin from '@renzp/build-info-webpack-plugin'

export default {
    plugins: [new BuildInfoWebpackPlugin()]
}

require

const BuildInfoWebpackPlugin = require('@renzp/build-info-webpack-plugin')

module.exports = {
    plugins: [new BuildInfoWebpackPlugin.default()]
}

如果使用的html模板名字不是index.html,则可通过html参数指定模板名称。注意是文件名称,不是文件路径。

例如:

  • html模板文件路径为:./src/html/index.html,则无需指定。
  • html模板文件路径为:./src/html/app.html,则需要指定html: 'app.html'
import BuildInfoWebpackPlugin from '@renzp/build-info-webpack-plugin'

export default {
    plugins: [new BuildInfoWebpackPlugin({ html: 'app.html'})]
}

Options

interface Options {
  // html模板文件,默认为index.html,如果使用的html模板不是index.html,则可以使用该选项指定模板文件名称
  html?: string
  // 是否显示项目名称(package.name)
  showName?:boolean
  // 是否显示项目版本号(package.version)
  showVersion?:boolean
  // 项目名称样式
  nameBlockColor?: string
  // 是否显示打包时间
  showTime?:boolean
  // 打包时间样式
  timeBlockColor?: string
  // 是否显示git信息
  showGit?:boolean
  // git信息样式
  gitBlockColor?: string
}
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago