yarn add copy-webpack-plugin --dev
Ensuite à ajouter dans le fichier webpack.config.js
// webpack.config.js
const Encore = require('@symfony/webpack-encore');
const CopyPlugin = require('copy-webpack-plugin'); // à ajouter
...
Encore
...
// à ajouter
.addPlugin(new CopyPlugin({
patterns: [
{ from: 'assets/images', to: 'images' },
]
}))
...
;