compilation.getLogger is not a function

Viewed 5939

I upgraded copy-webpack-plugin from 4.6.0 to 6.0.2

and I changed my code from

plugins: [
    new CopyWebpackPlugin([{
      from: clientAssetPath,
      to: paths.STATICS,
      ignore: [ '.gitkeep' ],
    }], {
      debug: 'info'
    }),
    new HtmlWebpackPlugin({
      ...htmlPluginOptions,
    }),
    new DynamicCDNWebpackPlugin({
      resolver: unpkgResolver,
    }),
  ]

to

plugins: [
    new CopyPlugin([{
      patterns: [{
        from: clientAssetPath,
        to: paths.STATICS,
        noErrorOnMissing: true
      }]
    }]),
    new HtmlWebpackPlugin({
      ...htmlPluginOptions,
    }),
    new DynamicCDNWebpackPlugin({
      resolver: unpkgResolver,
    }),
  ]

as given on official website

But it started throwing following error: compilation.getLogger is not a function

When I debugged it I found error is coming from node_modules/copy-webpack-plugin/dist/index.js enter image description here don't know what is the problem

1 Answers
Related