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
[flutter_tools] Generate correct entrypoint module name #49486
[flutter_tools] Generate correct entrypoint module name #49486
Conversation
@@ -347,17 +341,20 @@ class WebDevFS implements DevFS { | |||
'web', | |||
'dart_stack_trace_mapper.js', | |||
)); | |||
final String entrypoint = PackageUriMapper(mainPath, '.packages', null, null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this always a path under lib
? What does PackageUriMapper
do for files not under lib?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's not under lib, it returns null - so I'm falling back to mainPath. That ... kinda works, what does the frontend_server produce in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frontend_server will fall back to either the multi-root or absolute file uri (multi-root takes precedence).
The problem is down below we do /packages/$entrypoint.lib.js
which won't work with the absolute or multi root uris (you probably just want $entrypoint.lib.js
in that case?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh yeah, I'd need to check for the whole thing being null. I'll update with some tests
Description
Ensure that the bootstrap module is requested as
packages/package-name/path
instead of an absolute file path. Removes windows file-path workarounds from module mapping.