New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

package-version-source

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

package-version-source

用于记录构建的版本当时的状态,比如项目、分支、hash

latest
Source
npmnpm
Version
1.2.2
Version published
Maintainers
1
Created
Source

package-version-source

此插件用于记录构建的生产包溯源,记录的git仓库名、分支、及hash

package-version-source

Usage

import {getMetaRevised, getMetaRevisedObj} from 'package-version-source'
import createHtmlPlugin from 'vite-plugin-html'
createHtmlPlugin({
    minify: false,
    inject: {
        data: {
            injectSource: getMetaRevised(),
        },
    },
})
  <%- injectSource %>

Notice

此插件需要配合createHtmlPlugin插件搭配使用,通过ejs语法,替换占位符,版本溯源位于index.html>meta标签中,使用案例中是vite的集成方案,webpack请用对应的HTML-生成插件.

Keywords

version

FAQs

Package last updated on 01 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts