I spent too much time trying to figure out why my ACF block was not rendering before taking a look in the build folder and seeing no PHP files. If you’re using the Interactivity API and the scripts in package.json that it generates, it may have left off --webpack-copy-php
.
"scripts": {
"build": "wp-scripts build --experimental-modules --webpack-copy-php",
"format": "wp-scripts format",
"lint:css": "wp-scripts lint-style",
"lint:js": "wp-scripts lint-js",
"packages-update": "wp-scripts packages-update",
"plugin-zip": "wp-scripts plugin-zip",
"start": "wp-scripts start --experimental-modules --webpack-copy-php"
},