Fixed to work for multiple calls to webpack task.

The webpack task can run multiple times for one plugin, so we use
Object.create to copy the plugin before process the templates.