Razzle plugin to add babel-preset-php.
Note this is kind of a joke, but actually works.
yarn add razzle-plugin-php --dev
Add it to your razzle.config.js:
// razzle.config.js module.exports = { plugins: ['php'], };