baseUrl has the wrong value because app path has "/test/" in it
- Dominant language
- Dart
- Stars
- 224
- Forks
- 94
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 2
Description
Here is the [relevant code that was copied to dwds](https://github.com/dart-lang/build/blob/c88db16df8eab435a0ee74ecba65c39beda0a9e1/build_web_compilers/lib/src/dev_compiler_bootstrap.dart#L495-L504). Here is the code in dwds:
https://github.com/dart-lang/webdev/blob/3ad544e2c4d4dff5a4cb3e059f72cf075c156288/dwds/lib/src/loaders/require.dart#L36-L46
We got a report from a user seeing this issue (and I was able to reproduce it, too): https://github.com/flutter/flutter/issues/116360#issuecomment-1431243464
Basically, their app has a path "/sample_item/test/", it trips the generated bootstrap code into thinking that it's in test mode, and it calculates the wrong `baseUrl`.
Contributor guide
Assessment
This issue has not been assessed yet.