-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Fix for relative asset lookup (shouldUseRelativeAssetPaths
)
#5732
Comments
This is how I work around this issue.
I'll let the issue open to clarify, what the intended behavior should look like and decide if the fix should address the issue, or documentation could be updated. |
The same problem appears if |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
Any feedback? |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. |
Preface
The issue to import e.g. fonts in css #5162 was closed by "Correctly lookup assets when using a relative build directory" #5163. The fix adds this line, to decide whether the feature should be used or not.
create-react-app/packages/react-scripts/config/webpack.config.prod.js
Line 33 in 7973c81
There are comments spread that recommend to set
"homepage": "."
or"homepage": "./"
inpackage.json
. See documentation.Issue
The application is served under different domains prefixed with a path ("/mypath").
Setting
"homepage": "./mypath"
was working fine, although I'm not sure if this is supported.But the fix for assets urls in (s)css will not be applied, because of the condition:
create-react-app/packages/react-scripts/config/webpack.config.prod.js
Line 33 in 7973c81
Fix
We could change the condition and paths will work in the described case.
The text was updated successfully, but these errors were encountered: