extract generator for module targets
use module target generator in ModuleTarget