-
Notifications
You must be signed in to change notification settings - Fork 39
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
Performance and SEO optimisations #96
Conversation
This removes the large amount of unused lodash bloat compiled in to MPW.
This prevents search engines trying to index them as "href" URLs, and thus will help with solidifying indexing better.
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.
I'm all for it! LGTM!
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.
tACK 6cfcff7
We absolutely need this the question is nonsensical in the perf increase alone and then SEO we do need to start addressing.
Great start
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.
Can you commit package.lock.json as well?
Adding this to the config should prevent bn.js to get loaded multiple times
resolve: {
alias: {
'bn.js': path.join(__dirname, 'node_modules/bn.js/lib/bn.js'),
}
},
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.
tACK, it's perfect now
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.
tACK 500ada3
Shoot, just saw, resolve conflicts lol
Resolved conflicts, good to go again. |
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.
tACK
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.
tACK b3be63b
Abstract
To improve MPW's size and loading time, this PR employs a bunch of webpack-level and dependency changes, such as:
production
mode (enables many dist optimisations) for builds.lodash
import for per-function lodash-es imports.<a>
buttons to<span>
.Much of these issues were shown with the help of Lighthouse, in which MPW has quite bad performance and loading times - this PR will dramatically decrease the loading time for MPW.
My current local tests (using production and this PR) show these results:
Production (CSS and JS only)

Pull Request (CSS and JS only)

What does this PR address?
The PR helps address the slow loading times of MPW, by vastly decreasing the app's compiled size and by stripping unused dependency bloat from the app.
What features or improvements were added?
No user-level features, just faster loading! (Which also means less bandwidth usage).
How does this benefit users?
MPW will now load significantly faster, especially notable on slower networks or hosts, this PR also improves SEO and search engine indexing by the boost in performance, and the tweak to the navbar which resolves some indexing issues.