Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic URLs in JS don't get rewritten (rootURL case) #134

Open
mehulkar opened this issue Mar 18, 2020 · 1 comment
Open

Dynamic URLs in JS don't get rewritten (rootURL case) #134

mehulkar opened this issue Mar 18, 2020 · 1 comment

Comments

@mehulkar
Copy link

class Foo {
  imagePath = `${imageDir}/sample.png`;
}

This doesn't get rewritten with the asset rev. One use case for this is in an Ember app that specifies a rootURL. Because a JS declaration to a path doesn't handle rootURLs, we have to prefix them with ${ENV.rootURL}/assets/images/sample.png.

@nruth
Copy link

nruth commented Mar 16, 2021

https://github.com/adopted-ember-addons/ember-cli-ifa might help. It was mentioned in #141
In our app I just use what you mentioned, except ${ENV.rootURL}assets without the / before assets, so you don't get two /s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants