iampava / imagemin-webp-webpack-plugin

Webpack plugin which converts images to the WebP format while also keeping the original files.
MIT License
113 stars 27 forks source link

When using with Craco, it Compiles but no file is output. #104

Closed dweng0 closed 1 year ago

dweng0 commented 1 year ago

Hi all, have an older CRA app (4) that uses craco to override webpack and inject this plugin, here is how the file looks:

const ImageminWebpWebpackPlugin = require('imagemin-webp-webpack-plugin')
const imageminWebp = new ImageminWebpWebpackPlugin({
  config: [
    {
      test: /\.(jpe?g|png)/,
      options: {
        quality: 75,
      },
    },
  ],
  overrideExtension: false,
  detailedLogs: true,
  silent: false,
})

module.exports = {
  logLevel: 'debug',
  webpack: {
    plugins: {
      add: [imageminWebp],
    },
  },
}

I've set the log levels so i can see whats going on, and I get the following logs from the plugin: 15.9 KB saved from 'static/media/large_card.07c90935.png

however, after successfully compiling, i'm unable to find the images in the build folder, or anywhere in the workspace (searching for *webp)

is there a better way to debug this? the logs don't give much information

dweng0 commented 1 year ago

Ignore me guys, the public folder needs copying over