PLEASE DONT USE THIS PLUGIN FOR WEBPACK VERSION < 4

craco-copy-webpack-plugin

This is a craco plugin that adds copy-webpack-plugin

Installation

First, follow the craco Installation Instructions to install the craco package, create a craco.config.js file.

Then install craco-copy-webpack-plugin:

$ yarn add craco-copy-webpack-plugin

# OR

$ npm i -S craco-copy-webpack-plugin

Usage

Here is a complete craco.config.js configuration file that adds copy-webpack-plugin to create-react-app:

module.exports = {
  plugins: [
    {
      plugin: require('craco-copy-webpack-plugin'),
      options: {
        patterns: [{
          from: './src/assets/',
          to: './dist/assets/',
        }]
      }
    },
  ],
}