By default, WP-AppKit includes CrossWalk Cordova plugin, leading to a heavy final application (+20MB).

To disable CrossWalk and reduce the size of the application, add the following in a php file in your WP-AppKit theme’s php folder:

function remove_crosswalk( $default_plugins ) {
     if( !empty( $default_plugins['cordova-plugin-crosswalk-webview'] ) ) {
         unset( $default_plugins['cordova-plugin-crosswalk-webview'] );
     }
      return $default_plugins;
}
add_filter( 'wpak_default_phonegap_build_plugins', 'remove_crosswalk' );

Warning: this could lead to some features not being well handled by some old devices, especially animations.

Published by Lionel on October 4, 2017

Web Developer for an insurance company, WordPress since 2009, aware about front-end performance and curious about (almost) anything

2 Comments

  1. Hello!

    Where need paste this code?

    Reply
    • Hi, this snippet can be copied in a php file inside your WP-AppKit theme’s php folder (something like /wp-content/themes-wp-appkit/your-theme/php/my-crosswalk-config.php). You can take a look here for more info about this theme’s php folder usage.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Having questions?

FAQ | Tutorials | Documentation

Or

Contact Us