Skip to content

Commit

Permalink
fix: build render.php when webpack watch in progress (#50939)
Browse files Browse the repository at this point in the history
Co-authored-by: Takshil Kunadia <takshilkunadia@Takshils-MacBook-Air.local>
  • Loading branch information
Takshil-Kunadia and Takshil Kunadia authored Jun 1, 2023
1 parent 96d03d6 commit f43a7cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if ( ! browserslist.findConfig( '.' ) ) {
const hasReactFastRefresh = hasArgInCLI( '--hot' ) && ! isProduction;

// Get paths of the `render` props included in `block.json` files
const renderPaths = getRenderPropPaths();
let renderPaths = getRenderPropPaths();

const cssLoaders = [
{
Expand Down Expand Up @@ -275,6 +275,7 @@ const config = {
context: getWordPressSrcDirectory(),
noErrorOnMissing: true,
filter: ( filepath ) => {
renderPaths = getRenderPropPaths();
return (
process.env.WP_COPY_PHP_FILES_TO_DIST ||
renderPaths.includes( filepath )
Expand Down

0 comments on commit f43a7cb

Please sign in to comment.