Rewrite "package:" imports in Dart files in build output #854
Labels
closed-duplicate
Closed in favor of an existing report
type-enhancement
A request for a change that isn't a bug
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="96" height="96"hspace="10"> Issue by munificent
Originally opened as dart-lang/sdk#16649
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: