rewrite import paths, track used package exports