Unable to load source maps when dart web project is not hosted in root folder. #2353
Labels
good first issue
A good starting issue for contributors (issues with this label will appear in /contribute)
package:webdev
type-enhancement
A request for a change that isn't a bug
Hi Team,
Our team migrated from the Google web tool kit to Dart recently.
Where
Our web server hosts both versions from different folder paths.
We were trying the source mapping feature supported by webdev using command 'webdev build --no-release'
Unfortunately, the scripts were not imported properly due to the invalid import file path set by bootstrap.js & require.js.
On further debugging, I understood the issue is because of the baseUrl function which returns "/" instead of expected "/v2".
Reading through the documentation, I found some suggestions related to adding
<base href="/v2">
, which do resolve the issue, but caused page routing and image loading issues.I was able to resolve the issue by returning "/v2" by default instead of "/" in baseUrl Function of generated bootstrap.js and require.js.
Hence I request the team to add an new command line argument to set baseUrl of project.
Ex:
webdev build --no-release --base-url="/v2"
The text was updated successfully, but these errors were encountered: