uidotdev / react-course

Code for ui.dev's "Classic React" course

Home Page:https://ui.dev/classic-react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

copyPlugin version 6.0.2 throws invalid options object on build

CBedzz opened this issue · comments

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' }]})

commented

Oops, didn't see that someone else already opened and solved this. Closing.