1.0.3 • Published 1 year ago

rollup-plugin-entry-banner v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

rollup-plugin-entry-banner

npm version NPM Downloads Build Status codecov MIT

Introduction

A simple Rollup plugin to prepend content to entry chunk

As follows:

screenshots

Usage

Install the plugin

npm install --save-dev rollup-plugin-banner

Add it to your rollup configuration:

import entryBanner from 'rollup-plugin-entry-banner';
// const { bannerEntry } = require('rollup-plugin-entry-banner'); /* use commonjs */
export default {
  plugins: [
    entryBanner()
  ]
}

Note: it can also be used in Vite.

Options

nametyperequireddefaultdescription
packageJsonDirstringfalseprocess.cwd()the directory path of The package.json file
presetbooleanfalsetruewhether apply the preset of the banner style (It includes the log style shown in the above picture. )
renderBannerfunctionfalseundefinedcustomize the output banner content

Other