This is a complete rewrite and resolves #2.
It should get released as v2.0.0 because there are breaking changes and it requires next.js v5.1.x as it depends on features introduced in this version.
Supports phases
Plugins can only be added in specific phases or excluded from phases
Configuration can get overwritten for specific phases
Adds an optional helper to only load a plugin in a specific phase
Plugins can specify by their own in which phases they should get loaded
This is a complete rewrite and resolves #2. It should get released as
v2.0.0
because there are breaking changes and it requires next.jsv5.1.x
as it depends on features introduced in this version.