Ошибка Copy Plugin

У меня вот такая проблема. Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema. - options[0] misses the property 'patterns'. Should be: [non-empty string | object { from, to?, context?, globOptions?, toType?, force?, flatten?, transform?, cacheTransform?, transformPath?, noErrorOnMissing? }, ...] (should not have fewer than 1 item). Это в файле webpack.config.js. Буду благодарен за помощь. new CopyPlugin([ {from: path.resolve(__dirname, 'src/favicon.ico'), to: path.resolve(__dirname, 'dist')} ]),


Ответы (1 шт):

Автор решения: John

Попробуй так:

new CopyPlugin({ patterns: [{ from: path.resolve(__dirname, './src/favicon.ico'), to: path.resolve(__dirname, 'dist/favicon.ico') }] }),
→ Ссылка