Various performance fixes#932
Conversation
| <body> | ||
| <div id="app"></div> | ||
| <script> | ||
| <script defer> |
There was a problem hiding this comment.
Not sure there's any benefit to using the defer attribute on the second Raven script tag, since it's an inline script w/o a src attribute. Per MDN, on usage of defer w/ script tags:
This attribute must not be used if the src attribute is absent (i.e. for inline scripts), in this case it would have no effect.
| "react-scroll": "^1.5.4", | ||
| "react-scroll-up-button": "^1.5.9", | ||
| "react-select": "^1.0.0-rc.5", | ||
| "react-table": "^6.0.5", |
There was a problem hiding this comment.
Finally got rid of this dependency, nice cleanup.
| import './shared/styles/normalize.global.css'; | ||
| import './shared/styles/react-table.global.css'; | ||
| import './shared/styles/react-select.global.css'; | ||
| import './shared/styles/notifications.css'; |
There was a problem hiding this comment.
@kylemh Should we also remove the file /public/notification.css ?
Another thing I'm not too knowledgeable about (possibly due to my inexperience w/ Webpack) is why we have two index HTML files - a /public/index.html and root-level index.html. In the public file, I still see the older (non-defer) Raven scripts, and also <link rel="stylesheet" href="%PUBLIC_URL%/notification.css">. Might we want to apply some of this PR's changes there too? On my dev machine, running this branch, I'm still seeing a CSS network request made for notification.css.
There was a problem hiding this comment.
After a bit of reading around @alexspence 's helpful comments from ejection within webpack related files, looks like we're serving everything relevant via public, and doing so on purpose (some kind of vulnerability).
I've updated public/index.html, removed public/notification.css, and deleted the ~/index.html to avoid further confusion.
jjhampton
left a comment
There was a problem hiding this comment.
LGTM, everything works after pulling the branch. Just had a couple questions, see comments.
| Notice the use of %PUBLIC_URL% in the tag above. | ||
| It will be replaced with the URL of the `public` folder during the build. | ||
| Only files inside the `public` folder can be referenced from the HTML. | ||
| <meta name="theme-color" content="#47566b"> |
There was a problem hiding this comment.
Nice update of this theme color! Looks nice.
Event is in the past, this can be re-added for future event if needed
Description of changes
deferorasyncon Raven.react-tablenotification.cssvia import in src/index.jsIssue Resolved
Fixes #930