The solution I'm using is the following:
Compile the plugin using the command line:
"ENGINE_DIR\UE_4.22\Engine\Build\BatchFiles\RunUAT.bat" BuildPlugin -Plugin="PATH_TO_MY_PLUGIN\MyPlugin.uplugin" -Package="PATH_TO_BUILD_FOLDER" -TargetPlatforms=Win64 -Rocket -precompile
Obviously replace ENGINE_DIR, PATH_TO_MY_PLUGIN, MyPlugin, PATH_TO_BUILD_FOLDER
Note that you should either add -precompile to the argument (as above) or put bPrecompile=true into your build.cs files