diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index cfea089ad09b3..b58849d3d6ee9 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -6,6 +6,10 @@ - The bundled `@svgr/webpack` dependency has been updated from requiring `^5.5.0` to requiring `^6.2.1` ([#38866](https://github.com/WordPress/gutenberg/pull/38866)). See [official migration guide to v6](https://react-svgr.com/docs/migrate/) for details. +### New Feature + +- Automatically copy PHP files located in the `src` folder and its subfolders to the output directory (`build` by default) ([#38715](https://github.com/WordPress/gutenberg/pull/38715)). + ## 21.0.2 (2022-02-15) - Entry points are not detected in Windows OS ([#38781](https://github.com/WordPress/gutenberg/pull/38781)). diff --git a/packages/scripts/config/webpack.config.js b/packages/scripts/config/webpack.config.js index d4ca729dca87f..68dd39c810d41 100644 --- a/packages/scripts/config/webpack.config.js +++ b/packages/scripts/config/webpack.config.js @@ -232,6 +232,11 @@ const config = { context: 'src', noErrorOnMissing: true, }, + { + from: '**/**.php', + context: 'src', + noErrorOnMissing: true, + }, ], } ), // The WP_BUNDLE_ANALYZER global variable enables a utility that represents