Core package doesn't have unminified JS.
This commit is contained in:
Jeff Stieler 2020-07-28 10:52:32 -04:00 committed by GitHub
parent dc5304823b
commit 6bcf6510bd
1 changed files with 3 additions and 1 deletions

View File

@ -261,7 +261,9 @@ class FeaturePlugin {
* @return bool
*/
protected function check_build() {
return file_exists( plugin_dir_path( __DIR__ ) . '/dist/app/index.js' );
$script_debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
$suffix = Loader::should_use_minified_js_file( $script_debug ) ? '.min' : '';
return file_exists( plugin_dir_path( __DIR__ ) . "/dist/app/index{$suffix}.js" );
}
/**