0.0.3 • Published 7 months ago

rsbuild-plugin-git-hash v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

rsbuild-plugin-git-hash

rsbuild-plugin-git-hash 是一个Rsbuild插件,旨在为打包后的应用注入当前的Git Commit Hash。该插件会在构建过程中获取最新的Git Commit Hash,并将其作为日志信息输出到控制台,同时将其嵌入到生成的HTML文件中,以便在浏览器控制台中查看。 主要功能:

  • 在构建前获取当前项目的Git Commit Hash。
  • 将Git Commit Hash以日志形式输出到构建过程的控制台。
  • 将Git Commit Hash嵌入到生成的HTML文件的head部分,作为内联脚本执行,从而在浏览器控制台中显示。

Usage

Install:

npm add rsbuild-plugin-git-hash -D

Add plugin to your rsbuild.config.ts:

// rsbuild.config.ts
import { pluginGitHash } from "rsbuild-plugin-git-hash";

export default {
  plugins: [pluginGitHash()],
};

License

MIT.

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago