-
Notifications
You must be signed in to change notification settings - Fork 477
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
Use <base> and config webpack at runtime to allow path prefix #198
Conversation
Signed-off-by: Joe Farro <joef@uber.com>
Codecov Report
@@ Coverage Diff @@
## master #198 +/- ##
==========================================
+ Coverage 91.46% 91.47% +<.01%
==========================================
Files 95 96 +1
Lines 2133 2135 +2
Branches 435 436 +1
==========================================
+ Hits 1951 1953 +2
Misses 161 161
Partials 21 21
Continue to review full report at Codecov.
|
what's the issue with code coverage? the numbers are always confusing does |
Signed-off-by: Joe Farro <joef@uber.com>
@yurishkuro I think that means of the modified lines 88.88% of them were hit by code coverage. |
…tracing#198) * Fix #42 use <base> and config webpack at runtime Signed-off-by: Joe Farro <joef@uber.com> * Discourage manually editing the base URL Signed-off-by: Joe Farro <joef@uber.com> Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
Fix #42.
Allows a path prefix to be used through four changes:
package.json#homepage
is set to"."
. When create-react-app generates the build index.html the static assets are linked via relative paths.<base>
element to the index.html template. All relative paths (e.g. the static assets referenced in HTML) are relative to the value of<base>
, which is set to"/"
in index.html, but the query-service can replace it (see Provide a means to define a path-prefix for the UI jaeger#745). It's worth noting, this only affects relative paths.publicPath
value in webpack is configured at runtime via the__webpack_public_path__
global. The value is derived from the<base>
, and ensures any chunks or other assets (like the logo) are loaded relative to the site prefix.pathPrefix
used forfetch()
calls is based on the<base>
value instead ofpackage.json#homepage
As a side note, this PR can be merged before any work is done in the query-service.