Gathering detailed insights and metrics for @renzp/unplugin-build-info
Gathering detailed insights and metrics for @renzp/unplugin-build-info
Gathering detailed insights and metrics for @renzp/unplugin-build-info
Gathering detailed insights and metrics for @renzp/unplugin-build-info
npm install @renzp/unplugin-build-info
Typescript
Module System
Node Version
NPM Version
TypeScript (85.59%)
JavaScript (7.21%)
HTML (7.2%)
Total Downloads
408
Last Day
1
Last Week
3
Last Month
11
Last Year
408
8 Stars
12 Commits
1 Watching
1 Branches
1 Contributors
Latest Version
1.0.3
Package Id
@renzp/unplugin-build-info@1.0.3
Unpacked Size
86.34 kB
Size
9.14 kB
File Count
44
NPM Version
10.5.0
Node Version
20.12.2
Publised On
05 Sept 2024
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-57.1%
3
Compared to previous week
Last month
83.3%
11
Compared to previous month
Last year
0%
408
Compared to previous year
一款将打包信息打印在控制台上的插件。
支持框架:
webpack4/webpack5
vite
rollup
rspack
rsbuild
farm
1npm i @renzp/unplugin-build-info -D
1// webpack.config.ts 2import BuildInfoWebpackPlugin from '@renzp/unplugin-build-info/webpack' 3 4export default { 5 plugins: [BuildInfoWebpackPlugin()] 6}
1// vite.config.ts 2import { defineConfig } from 'vite' 3import BuildInfoVitePlugin from '@renzp/unplugin-build-info/vite' 4 5export default defineConfig({ 6 plugins: [BuildInfoVitePlugin()], 7})
1// rspack.config.js 2const BuildInfoRspackPlugin = require('@renzp/unplugin-build-info/rspack') 3 4module.exports = { 5 plugins: [BuildInfoRspackPlugin.default()] 6}
1// rsbuild.config.ts 2import { defineConfig } from '@rsbuild/core' 3import BuildInfoRspackPlugin from '@renzp/unplugin-build-info/rspack' 4 5export default defineConfig({ 6 tools: { 7 rspack: { 8 plugins: [BuildInfoRspackPlugin()], 9 }, 10 }, 11})
1// rollup.config.mjs 2import BuildInfoRollupPlugin from '@renzp/unplugin-build-info/rollup' 3 4export default { 5 plugins: [BuildInfoRollupPlugin()], 6}
1// farm.config.ts 2import { defineConfig } from '@farmfe/core' 3import BuildInfoVitePlugin from '@renzp/unplugin-build-info/vite' 4 5export default defineConfig({ 6 vitePlugins: [BuildInfoVitePlugin()], 7})
如果使用的html模板名字不是index.html
,则可通过html
参数指定模板名称(vite插件不需要此参数)。注意是文件名称,不是文件路径。
例如:
./src/html/index.html
,则无需指定。./src/html/app.html
,则需要指定html: 'app.html'
原因:内部通过匹配资源文件名来进行查找html文件的,默认为index.html,如果不是则需要指定。
1import BuildInfoWebpackPlugin from '@renzp/unplugin-build-info/webpack' 2 3export default { 4 plugins: [BuildInfoWebpackPlugin({ html: 'app.html'})] 5}
1interface Options { 2 // html模板文件,默认为index.html,如果使用的html模板不是index.html,则可以使用该选项指定模板文件名称 3 html?: string 4 // 是否显示项目名称(package.name) 5 showName?:boolean 6 // 是否显示项目版本号(package.version) 7 showVersion?:boolean 8 // 项目名称样式 9 nameBlockColor?: string 10 // 是否显示打包时间 11 showTime?:boolean 12 // 打包时间样式 13 timeBlockColor?: string 14 // 是否显示git信息 15 showGit?:boolean 16 // git信息样式 17 gitBlockColor?: string 18}
No vulnerabilities found.
No security vulnerabilities found.