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

assetmap url when prepend is empty

Đang mở
#32 7 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
56
Fork
46
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.