Rewrite "package:" imports in Dart files in build output #16649
Labels
closed-duplicate
Closed in favor of an existing report
type-enhancement
A request for a change that isn't a bug
If you run pub build in debug, you'll get Dart files in the build output. There will likely be other ways in the future of getting Dart files in your output. If they contain "package:" imports, those will fail unless the Dart file happens to be in the top level of the build output where we put the one copy of "packages".
For all other cases, there is no adjacent "packages" directory. To fix that, we want a built-in transformer in pub that rewrites those imports to relative ones that walk up to the main "packages" directory.
The text was updated successfully, but these errors were encountered: