Modularize the plugin compiling