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

assetmap url when prepend is empty

オープン
#32 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
56
フォーク
46
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。