lately I’ve been seeing the following error in pages where the
Uncaught ReferenceError: wp is not defined
Despite the question about how to solve the error, it makes me wonder how many unnecessary things are loaded. Can you completely remove the color-picker as an ACF library component?
Also, (hijacking my own thread :D) same question for other ‘heavy’ elements like repeater sortables.
Answering my own question… found a snippet online that resolves the issue – credit to whoever provided it!
wp_deregister_script( 'jquery-ui-datepicker' );
wp_deregister_script( 'wp-color-picker-js-extra' );
wp_deregister_script( 'wp-color-picker' );