const CopyWebpackPlugin = require('copy-webpack-plugin');
// WriteFilePlugin needed only for webpack 3-4 and webpack dev-server
const WriteFilePlugin = require('write-file-webpack-plugin');
plugins: [
...
new WriteFilePlugin(),
new CopyWebpackPlugin([
{from: 'files', to: 'files'},
{from: 'images-2x', to: 'images-2x'},
{from: 'images', to: 'images'},
]),
]