All Projects → sonatype-nexus-community → copy-modules-webpack-plugin

sonatype-nexus-community / copy-modules-webpack-plugin

Licence: Apache-2.0 License
A Webpack plugin which copies module sources to a separate directory

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to copy-modules-webpack-plugin

flow-webpack-plugin
A webpack plugin allowing to call Flow type checker.
Stars: ✭ 36 (+111.76%)
Mutual labels:  webpack-plugin
chunk-progress-webpack-plugin
Provides runtime progress events by replacing default webpack chunk loading with XHR
Stars: ✭ 17 (+0%)
Mutual labels:  webpack-plugin
tinyimg-webpack-plugin
A webpack plugin for compressing image
Stars: ✭ 61 (+258.82%)
Mutual labels:  webpack-plugin
amp-react-renderer-plugin
⚡Plugin makes it painless to create React component based AMP page⚡
Stars: ✭ 29 (+70.59%)
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 (+47.06%)
Mutual labels:  webpack-plugin
base-href-webpack-plugin
Webpack plugin for inserting base href tag in head block
Stars: ✭ 23 (+35.29%)
Mutual labels:  webpack-plugin
stylelint-bare-webpack-plugin
Stylelint plugin for webpack
Stars: ✭ 15 (-11.76%)
Mutual labels:  webpack-plugin
webpack-ext-reloader
Add hot reloading to your webpack WebExtension! 🔥
Stars: ✭ 31 (+82.35%)
Mutual labels:  webpack-plugin
inline-source-webpack-plugin
A webpack plugin to embed css/js resource in the html.
Stars: ✭ 18 (+5.88%)
Mutual labels:  webpack-plugin
asset-graph-webpack-plugin
Webpack plugin to easily get assets dependency graph based on entry point
Stars: ✭ 13 (-23.53%)
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 (+464.71%)
Mutual labels:  webpack-plugin
tde-webpack-mjml-plugin
Webpack plugin for converting MJML files to HTML
Stars: ✭ 12 (-29.41%)
Mutual labels:  webpack-plugin
dva-typescript-antd-starter-kit
A admin dashboard application demo based on antd by typescript and dva
Stars: ✭ 61 (+258.82%)
Mutual labels:  webpack-plugin
webpack-shower
🚿 Clean up, Arrange, Filter Webpack Stats
Stars: ✭ 12 (-29.41%)
Mutual labels:  webpack-plugin
prettier-webpack-plugin
Process your Webpack dependencies with Prettier
Stars: ✭ 47 (+176.47%)
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 (+247.06%)
Mutual labels:  webpack-plugin
license-info-webpack-plugin
Making a list of package's LICENSE information for webpack
Stars: ✭ 20 (+17.65%)
Mutual labels:  webpack-plugin
add-module-exports-webpack-plugin
Add `module.exports` for Babel and TypeScript compiled code
Stars: ✭ 36 (+111.76%)
Mutual labels:  webpack-plugin
bundle-inspector-webpack-plugin
Bundle Inspector | Analysis Tool for Webpack
Stars: ✭ 19 (+11.76%)
Mutual labels:  webpack-plugin
robotstxt-webpack-plugin
A webpack plugin to generate a robots.txt file
Stars: ✭ 31 (+82.35%)
Mutual labels:  webpack-plugin

Copy Modules Plugin

Table Of Contents

Introduction

copy-modules-webpack-plugin is a Webpack plugin which copies all of the source files which go into the webpack bundle(s) to a separate directory. This enables external tools such as Sonatype Nexus Lifecycle to analyze only those source files which will be included in the final bundle.

N.B. Since version 2.0 the plugin is only compatible with webpack 4.0 and later. Use 1.x releases for webpack 3.

Installation

npm install --save-dev copy-modules-webpack-plugin

Usage

Instantiate the plugin with the desired configuration options and include it in the plugins array of your webpack configuration:

const CopyModulesPlugin = require("copy-modules-webpack-plugin");

module.exports = {
  ...
  plugins: [
    new CopyModulesPlugin({
      destination: 'webpack-modules'
    })
  ]
}

Configuration

copy-modules-webpack-plugin currently supports the following configuration options:

destination
The destination directory where the modules will be copied.
includePackageJsons

When using Webpack 4, set this to true to also copy the package.json file associated with each copied module file. This may be useful if you are analyzing the output with a tool that has need for additional metadata about each module (Default: false).

Note: when using webpack 5, the package.json files are copied regardless of the value of this flag.

The Fine Print

It is worth noting that this is NOT SUPPORTED by Sonatype, and is a contribution of ours to the open source community (read: you!)

Remember:

  • Use this contribution at the risk tolerance that you have
  • Do NOT file Sonatype support tickets related to Webpack support
  • DO file issues here on GitHub, so that the community can pitch in

Phew, that was easier than I thought. Last but not least of all:

Have fun creating and using this plugin, we are glad to have you here!

Getting help

Looking to contribute to our code but need some help? There's a few ways to get information:

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].