Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #1247 bug: accept use with addPlugin only (gimler)
This PR was merged into the main branch. Discussion ---------- bug: accept use with addPlugin only i have a multi config setup. In one of my configs i only call `addPlugin()`. ```js const path = require('node:path'); const fileName = process.env.COPY_FILE_NAME || false; let copyConfig = {}; if (fileName) { copyConfig = { from: `${fileName}`, to: `${path.dirname(path.relative(path.resolve(__dirname, 'picture'), fileName))}/[name].[contenthash:8][ext]`, } } else { copyConfig = { from: './picture', to: '[path][name].[contenthash:8][ext]' } Encore.cleanupOutputBeforeBuild() }; const CopyPlugin = require('copy-webpack-plugin'); Encore ... .addPlugin( new CopyPlugin({ patterns: [copyConfig], }) ) ... ``` this config only copy files optional only a specific ;) Actually only use `addPlugin()` is not supported. I change the code and add test for the scenario. releated #1140 Commits ------- 1bfd797 bug: accept use with addPlugin only
- Loading branch information