Skip to content

Commit

Permalink
Scripts: Copy PHP files from src into build (#38715)
Browse files Browse the repository at this point in the history
* Copy any .php files to the build folder.

* Add CHANGELOG entry

Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
  • Loading branch information
ryanwelcher and gziolo committed Feb 22, 2022
1 parent 5ae3a30 commit 242aeb1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/scripts/CHANGELOG.md
Expand Up @@ -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)).
Expand Down
5 changes: 5 additions & 0 deletions packages/scripts/config/webpack.config.js
Expand Up @@ -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
Expand Down

0 comments on commit 242aeb1

Please sign in to comment.