Skip to content

Rewrite "package:" imports in Dart files in build output #854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DartBot opened this issue Jun 5, 2015 · 2 comments
Closed

Rewrite "package:" imports in Dart files in build output #854

DartBot opened this issue Jun 5, 2015 · 2 comments
Labels
closed-duplicate Closed in favor of an existing report type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<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.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Marked this as being blocked by #846.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Added Duplicate label.
Marked as being merged into #799.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

1 participant