Output dependencies correctly for packages, add support for --remap and browser renames in external modules