All Projects → yami-beta → license-info-webpack-plugin

yami-beta / license-info-webpack-plugin

Licence: MIT license
Making a list of package's LICENSE information for webpack

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to license-info-webpack-plugin

webpack-stats-diff-plugin
Webpack plugin for reporting changes in bundle sizes across builds
Stars: ✭ 63 (+215%)
Mutual labels:  webpack-plugin
stylelint-bare-webpack-plugin
Stylelint plugin for webpack
Stars: ✭ 15 (-25%)
Mutual labels:  webpack-plugin
module-mapping-webpack-plugin
Webpack plugin for mapping modules onto different files
Stars: ✭ 25 (+25%)
Mutual labels:  webpack-plugin
size-plugin-bot
A Github bot for size-plugin
Stars: ✭ 76 (+280%)
Mutual labels:  webpack-plugin
2018-package-three-webpack-plugin
[ARCHIVED] Webpack plugin to use Three.js "examples" classes
Stars: ✭ 45 (+125%)
Mutual labels:  webpack-plugin
flow-webpack-plugin
A webpack plugin allowing to call Flow type checker.
Stars: ✭ 36 (+80%)
Mutual labels:  webpack-plugin
webpack-alioss-upload-plugin
A flexible webpack plugin to upload files to aliyun oss, which supports multiple optional upload methods and parameters.
Stars: ✭ 14 (-30%)
Mutual labels:  webpack-plugin
inline-source-webpack-plugin
A webpack plugin to embed css/js resource in the html.
Stars: ✭ 18 (-10%)
Mutual labels:  webpack-plugin
webpack2-externals-plugin
Webpack 2+ fork of Webpack-Externals-Plugin
Stars: ✭ 14 (-30%)
Mutual labels:  webpack-plugin
mangle-css-class-webpack-plugin
Minifies and obfuscates the class names in your existing JavaScript, CSS, and HTML without any modern css modules.
Stars: ✭ 96 (+380%)
Mutual labels:  webpack-plugin
css-chunks-html-webpack-plugin
Injecting css chunks extracted using extract-css-chunks-webpack-plugin to HTML for html-webpack-plugin
Stars: ✭ 22 (+10%)
Mutual labels:  webpack-plugin
image-sprite-webpack-plugin
A webpack plugin that generates spritesheets from your stylesheets.
Stars: ✭ 27 (+35%)
Mutual labels:  webpack-plugin
webpack-shower
🚿 Clean up, Arrange, Filter Webpack Stats
Stars: ✭ 12 (-40%)
Mutual labels:  webpack-plugin
monaco-editor-esm-webpack-plugin
No description or website provided.
Stars: ✭ 25 (+25%)
Mutual labels:  webpack-plugin
tde-webpack-mjml-plugin
Webpack plugin for converting MJML files to HTML
Stars: ✭ 12 (-40%)
Mutual labels:  webpack-plugin
loading-screen
🚥Loading screen for webpack plugin inspired by Nuxt.js's loading screen
Stars: ✭ 56 (+180%)
Mutual labels:  webpack-plugin
generate-package-json-webpack-plugin
Generates a package.json file containing the external modules used by your webpack bundle
Stars: ✭ 59 (+195%)
Mutual labels:  webpack-plugin
chunk-progress-webpack-plugin
Provides runtime progress events by replacing default webpack chunk loading with XHR
Stars: ✭ 17 (-15%)
Mutual labels:  webpack-plugin
meteor-imports-webpack-plugin
Webpack plugin to import and use Meteor packages like if they were real NPM packages.
Stars: ✭ 25 (+25%)
Mutual labels:  webpack-plugin
amp-react-renderer-plugin
⚡Plugin makes it painless to create React component based AMP page⚡
Stars: ✭ 29 (+45%)
Mutual labels:  webpack-plugin

license-info-webpack-plugin

npm version

license-info-webpack-plugin is a webpack plugin for making a list of package's LICENSE information, inspired by licensify.

$ npm install --save-dev license-info-webpack-plugin
$ yarn add --dev license-info-webpack-plugin

Usage

webpack v4

If you use webpack < 4.2 that has dependency on uglifyjs-webpack-plugin < 1.2.4, you need to set optimization to set uglifyOptions.

const path = require('path');
const LicenseInfoWebpackPlugin = require('license-info-webpack-plugin').default;
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");

module.exports = {
  mode: 'production',
  entry: './src/js/index.js',
  output: {
    path: path.join(__dirname, 'dist/js'),
    filename: '[name].js'
  },
  plugins: [
    new LicenseInfoWebpackPlugin({
      glob: '{LICENSE,license,License}*'
    })
  ]
};

webpack v3

const path = require('path');
const LicenseInfoWebpackPlugin = require('license-info-webpack-plugin').default;
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");

module.exports = {
  entry: './src/js/index.js',
  output: {
    path: path.join(__dirname, 'dist/js'),
    filename: '[name].js'
  },
  plugins: [
    new LicenseInfoWebpackPlugin({
      glob: '{LICENSE,license,License}*'
    }),
    new UglifyJsPlugin({
      uglifyOptions: {
        output: {
          comments: /^\**!|@preserve|@license|@cc_on/
        }
      }
    })
  ]
};

Note

If you use uglifyjs-webpack-plugin@^1.2.4 or webpack has dependency on uglifyjs-webpack-plugin@^1.2.4, you don't need to set uglifyOptions for preserve license comments.
Related: webpack-contrib/uglifyjs-webpack-plugin#250

If you use uglifyjs-webpack-plugin@~1.1, you need to set uglifyOptions for preserve license comments.
Related: webpack-contrib/uglifyjs-webpack-plugin#174

license-info-webpack-plugin needs webpack v3.0 or above

Options

  • glob
    • Glob pattern for LICENSE file
    • Default: '{LICENSE,license,License}*'
  • outputType
    • Output type: 'banner' or 'html'
      • 'banner': Append comment to top of bundled code
      • 'html': Generate html (e.g. license.[name].html)
    • Default: 'banner'
  • includeLicenseFile
    • Include and put LICENSE file
    • Default: true

LICENSE

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].