Skip to content

About

Exports all used node modules of a webpack bundle to a file.

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Modules List Webpack Plugin

npm version

Exports metadata of all used node modules of a webpack bundle to a file.

Usage

This plugin creates a list with the name, version, license, and link to the repo of each node module in the webpack bundle.
The output file name can be configured, and defaults to npm-modules.md

const ExportNodeModules = require('webpack-node-modules-list');

module.exports = {
plugins: [
  new ExportNodeModules()
]}

Options

An options object may be passed to the constructor.

options.chunkName

This option allows to filter the output so that it only includes chunks with a matching chunk name.

options.outputFile

This option allows to change the name of the output file. The file path is relative to the webpack output directory.

Example

This plugin works perfectly with the SplitByPathPlugin plugin.
The example below demonstrates all configurable features.

const ExportNodeModules = require('webpack-node-modules-list'),
  SplitByPathPlugin = require('webpack-split-by-path'),
  chunkName = 'vendor';

module.exports = {
plugins: [
  new SplitByPathPlugin([
    {
      name: chunkName,
      path: path.join(__dirname, 'node_modules')
    }
  ]),
  new ExportNodeModules({chunkName, outputFile: 'npm.md'})
]}

About

Exports all used node modules of a webpack bundle to a file.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages