webpack-encore icon indicating copy to clipboard operation
webpack-encore copied to clipboard

configureImageRule and configureFontRule [ext] is different from copyFiles

Open Seb33300 opened this issue 4 years ago • 5 comments

The filename option of configureImageRule and configureFontRule is not consistent with copyFiles.

With copyFiles, [ext] doesn't include the dot => jpg With configureImageRule, [ext] includes the dot => .jpg

This means we have to set 2 different config to achieve the same result:

.configureImageRule({filename: '[path][name].[hash:8][ext]'})
.copyFiles([{context: './', from: './assets/images', to: '[path][name].[hash:8].[ext]'}])

Seb33300 avatar Jun 07 '21 03:06 Seb33300

Hi, I have the same issue. Is there any news on this? Maybe my config (similar to @Seb33300) is wrong?

.configureImageRule({
  type: 'asset',
  filename: `images/[name]${(Encore.isProduction() ? '.[hash:8]' : '')}[ext]`,
})

sacerro avatar Feb 13 '24 15:02 sacerro