Fix build check for core. (https://github.com/woocommerce/woocommerce-admin/pull/4867)
Core package doesn't have unminified JS.
This commit is contained in:
parent
dc5304823b
commit
6bcf6510bd
|
@ -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" );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue