webpack-encore
webpack-encore copied to clipboard
configureImageRule and configureFontRule [ext] is different from copyFiles
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]'}])
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]`,
})