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

assetmap url when prepend is empty

Aperta
#32 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
56
Fork
46
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

```
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?

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.