[core][fr] change typeof(exports) before the require block