Extract refs to sourcemap