Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Unable to load source maps when dart web project is not hosted in root folder.

Abierto
#2,353 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
dart

Línea de trabajo

Start by reproducing the non-root deployment with webdev build --no-release, then inspect the generated bootstrap.js and require.js code where baseUrl is computed. The work is done when a build accepts the requested base URL, generates valid source-map imports under /v2, and does not require the conflicting <base> workaround.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

good first issue P3 package:webdev triaged type-enhancement

Hi Team,

Our team migrated from the Google web tool kit to Dart recently.
Where

  • v1 folder is legacy web project build using GWT framework
  • v2 folder is migrated web project using Dart SDK.

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"

Lenguaje dominante
Dart
Estrellas
224
Forks
95
Merge medio
3 d 8 h
PR fusionados (30 d)
7

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de dart-lang/webdev

Todos los issues de dart-lang/webdev

Issues similares

Más issues de Dart

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.