Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Waidd/assets-append-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assets Append Webpack Plugin

This plugin allow you to append text/code/whatever to your assets with webpack 2.

Requirements

  • node >= 6.9.4
  • webpack >= 2.2.0

Installation

npm install assets-append-webpack-plugin --save

Or add it to your package.json

Usage

Add the plugin in your webpack.config.js:

'use strict';

const AssetsAppendWebpackPlugin = require('assets-append-webpack-plugin');

module.exports = {
  entry: 'foo.js',
  output: {
    path: './build',
    filename: '[name].js'
  },
  plugins: [
    new AssetsAppendWebpackPlugin({
      header: '/* lorem ipsum */',
      footer: '/* lorem ipsum */'
    })
  ]
};

This plugin take an object or an array of objects. Each object can take theses arguments:

[{
  [header: '/* lorem ipsum */',]
  [footer: '/* lorem ipsum */',]
  [match: /buildname.js/] // optional: bundle's name must match this pattern, useful if you want to have differents header/footer for your bundles
}]

About

This plugin allow you to append text/code/whatever to your assets with webpack 2.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published