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

manifest.json doesn't include relative_url_root. #1357

Closed
jpickwell opened this issue Mar 15, 2018 · 4 comments
Closed

manifest.json doesn't include relative_url_root. #1357

jpickwell opened this issue Mar 15, 2018 · 4 comments

Comments

@jpickwell
Copy link
Contributor

For production sandbox deployment I have the app "mounted" under a subdirectory; e.g., example.com/subdir.

Currently, webpacker doesn't include the RAILS_RELATIVE_URL_ROOT in the manifest.json, even if it's set.

@sspread
Copy link
Contributor

sspread commented Jun 19, 2019

@gauravtiwari @jpickwell Is this right? I'm also 'mounting' my app under a subdirectory, but it only works if I remove the code merged here. I believe the manifest.json should not include RAILS_RELATIVE_URL_ROOT as part of the asset paths.

@jpickwell
Copy link
Contributor Author

This worked for the app I was working on at the time, but a lot has changed. That app is now on a dedicated subdomain, so I'm no longer using RAILS_RELATIVE_URL_ROOT. There have been changes to how publicPath is calculated, so this may need to be revisited.

@rodrigomanhaes
Copy link

rodrigomanhaes commented May 14, 2020

@sspread the removal of relative path broke all urls inside scss files in my app when it runs in a subdirectory. Generated URLs don't include the app subdirectory in RAILS_RELATIVE_URL_ROOT. All works fine except url references inside sass files, including ones from packages (e.g. font awesome).

@rdavid369
Copy link

rdavid369 commented Aug 25, 2020

@sspread - What was the underlying problem that caused this to be removed? We deploy quite a few apps in sub directories and currently, webpack doesn't seem to know anything about the relative url root, so assets within css or scss files, like images used as background images for DOM elements, do not properly resolve because they are missing the relative url root.

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

4 participants