support opts & rewriteResolved