Socket
Socket
Sign inDemoInstall

smart-banner-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

smart-banner-webpack-plugin

This is a smart banner webpack plugin which has the same function and usage as webpack.BannerPlugin and supports [filename] syntax in banner string


Version published
Weekly downloads
12
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

smart-banner-webpack-plugin

Version npm NPM Download Dependencies

This is a smart banner webpack plugin which has the same function and usage as webpack.BannerPlugin and supports [filename] syntax in banner string

Note: This is a clone of webpack.BannerPlugin with the only difference that it supports variable [filename] in banner string which will be replaced by the chunk filename

Usage

The use of smart-banner-webpack-plugin 2.0.0 and 3.0.0 has a little difference which is illustrated in the following examples.

// webpack 1
import SmartBannerPlugin from 'smart-banner-webpack-plugin';

// part of webpack.config.js
{
  ...
  plugins: [
    new SmartBannerPlugin(
      `[filename] v1.0.0\n\nAuthor: johvin\nDate: ${new Date().toLocaleString()}\n`,
      { raw: false, entryOnly: true })
  ],
  ...
}

// webpack 2
import SmartBannerPlugin from 'smart-banner-webpack-plugin';

// part of webpack.config.js
{
  ...
  plugins: [
    new SmartBannerPlugin({
      banner: `[filename] v1.0.0\n\nAuthor: johvin\nDate: ${new Date().toLocaleString()}\n`,
      raw: false,
      entryOnly: true
    })
  ],
  ...
}

[filename] is replaced by the chunk filename in the process of compilation, e.g. the code below is a processed banner

/*!
 * server.js v1.0.0
 *
 * Author: johvin
 * Date: 2016-08-04 09:37:05
 *
 */

Change log

CHANGE LOG

Keywords

FAQs

Package last updated on 13 Feb 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc