copyPlugin version 6.0.2 throws invalid options object on build
CBedzz opened this issue · comments
Chris commented
Section: Production builds with hosting
Subsection: HOsting with Netlify
Description: If using the current version of copyPlugin, build fails due to invalid options
Error Message on build: "Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema."
copyPlugin current version: 6.0.2 (5.0.1 is course version)
Solution to change CopyPlugin in webpack plugins:
Old code: new CopyPlugin([{ from: '_redirects'}])
New working code: new CopyPlugin({patterns: [{ from: '_redirects' }]})
Chris commented
Oops, didn't see that someone else already opened and solved this. Closing.