add `opts.compiler` allows third party to override the internal compiler