adopted-ember-addons / adopted-ember-addons/ember-cli-ifa

assetmap url when prepend is empty

Abierto
#32 7 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
56
Forks
46
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

```
fingerprint: {
enabled: true
fingerprintAssetMap: true,
generateAssetMap: true,
prepend: ''
}
```

```
rootUrl: '/',
ifa: {
enabled: true,
inline: false
}
```

If I open my app under a path which is not the root path, e.g. `localhost:4200/de/intern/users` fetching of the asset map file fails because it uses the empty prepend option and tries to fetch it relative the current path `localhost:4200/de/intern/assets/assetMap-533afc92713400107780e8d5d67b0d89.json`

I solved it by adding

```
if ('/' !== assetMapFile.charAt(0)) {
assetMapFile = `/${assetMapFile}`;
}
```
to the initializer. But I am not sure if this will have any negative effects for other users?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.