banner-webpack-after-content

1.0.3 • Public • Published

banner-webpack-after-content

Introduction

append content before or after js bundle

Usage

if entry key in webpack config is like this: const jsDirectory = path.join(__dirname, "build-prod/static/js"); const filename = main.js;

entry: {
    "main": [path.join(jsDirectory, filename)],
  },

then, please use the same key for chunks in banner-webpack-plugin

new BannerWebpackPlugin({
      chunks: {
        "main": {
          afterContent: `"/** Hello World */"`,
        },
      },
    }),

Default of chunks key

* beforeContent
    - [String] 
    - append content before
* afterContent
    - [String] 
    - append content after

Result

var React = /******/ function(modules) { // webpackBootstrap
	/** some code here */
/******/ }); /** Hello World */;

Package Sidebar

Install

npm i banner-webpack-after-content

Weekly Downloads

3

Version

1.0.3

License

MIT

Unpacked Size

3.79 kB

Total Files

4

Last publish

Collaborators

  • imarksea