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

@bndynet/header-injection-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bndynet/header-injection-webpack-plugin

Webpack plugin for injecting header to text files, like copyright...

latest
Source
npmnpm
Version
4.0.2
Version published
Maintainers
1
Created
Source

header-injection-webpack-plugin (Webpack 4.x)

A webpack plugin to inject header you specified into text files(js, css, html).

Installation

npm i @bndynet/header-injection-webpack-plugin --save-dev

Usage

const HeaderInjectionWebpackPlugin = require('@bndynet/header-injection-webpack-plugin');

// webpack config
{
  plugins: [
    new HeaderInjectionWebpackPlugin()
  ]
}

Options defalut value

{
    package: './package.json',
    extensions: ['.js', '.css', '.html'],
    header: 'By default, includes name, version in your package.json and built time',  
}

Example:

const HeaderInjectionWebpackPlugin = require('@bndynet/header-injection-webpack-plugin');
const app = require('./package.json');

new HeaderInjectionWebpackPlugin({
    header: `${app.name} v${app.version} by ${app.author}`
})

Console Log:

ℹ 「hiw」: Injecting header for .html,.css,.js files ...
ℹ 「hiw」: Injecting header for main.79aa05215e152932a87d.js: /*! [hiw] header-injection-webpack-plugin / 1.0.0 / 2018-12-02T09:18:53.917Z */
ℹ 「hiw」: Injecting header for index.html: <!-- [hiw] header-injection-webpack-plugin / 1.0.0 / 2018-12-02T09:18:53.917Z -->
ℹ 「hiw」: 2 file(s) done

Keywords

webpack 4

FAQs

Package last updated on 10 Dec 2018

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