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

assetmap url when prepend is empty

Open
#32 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
56
Forks
46
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.