Pregunta

Is there a way to enable WordPress to run the non-minified version of React while developing Gutenberg blocks?

I am receiving an error from React while learning to create Gutenberg blocks.

react-dom.min.b75d8b30.js:62 Error: Minified React error #130; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

It would be very helpful to get the full error. I am using the Gutenberg suggested abstraction, wp.element.createElement in order to create the elements. So my plugin has no direct access to React.

¿Fue útil?

Solución

It took me way too long to find this but all you have to do is set SCRIPT_DEBUG to true. Simply add this line to wp-config.php:

define('SCRIPT_DEBUG', true);
Licenciado bajo: CC-BY-SA con atribución
scroll top