This is a craco plugin that adds copy-webpack-plugin
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
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/',
}]
}
},
],
}