-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor index files #887
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
Refactor index files #887
Conversation
f4b384a to
65fe9c8
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #887 +/- ##
==========================================
- Coverage 47.79% 47.76% -0.03%
==========================================
Files 351 351
Lines 11292 11292
Branches 1889 1889
==========================================
- Hits 5397 5394 -3
- Misses 5702 5708 +6
+ Partials 193 190 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
65fe9c8 to
dd360f2
Compare
|
@cecilia-donnelly @aasandei-vsp I ran this locally and kicked off a dev build -- it appears to be working as expected locally (inspecting I see the config properly injected in an environments object) Dev is harder to parse since things are minified, but I see index.html is much smaller / linking the external js and the application itself works, so that's a great sign. It would be worth invoking something that would trigger NewRelic and confirming that the action had the expected effect on NewRelic from dev. ALSO PLEASE NOTE: this adds a new project dependency, and so you will need to re-build your web-app image. |
|
Some questions:
|
|
@aasandei-vsp the error you're seeing is related to that note I added in the end of the comment above You have to blow away the image and rebuild because our docker containers don't update their installations of npm dependencies on start. This is an augmentation we should make since it so regularly causes issues, but it isn't in scope for this specific PR. For testing in other envs I did deploy to dev and it worked (I don't think there's a great way to test in other envs outside of the deploy cycle, but seeing it work in dev is a good sign) |
aasandei-vsp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made it work locally, thanks @slifty for the help!
We had one index file per environment AND each one included a full copy of the new relic client. This commit fixes both items of tech debt. We now use an npm package for that vendor library, which allows us to (A) remove it from our code and (B) keep it up to date using package tooling. We also now have a single index and environment configuration is done via the angular build tooling Issue #885 Reduce size of index.html
It seems this isn't actually used any longer, and with our refactor it was causing issues.
2b06111 to
73d81f2
Compare

This PR improves our
index.htmlin two ways:We no longer have environment-specific index files, instead having just one with angular environments determining which dynamic values / tokens to use.
We no longer include vendor code in our index file, instead registering it as a dependency which is inserted via angular.
This is much cleaner and easier to maintain.
Resolves #885