-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add Parcel for bundling #55
Conversation
Once @misterpeddy is happy with the latest Lighthouse CI changes (re: documentation), I'll merge it and we'll be able to see how the changes perform here. |
After locally testing the built version (using
(I wonder why running the dev site served by After digging into the performance result, the difference is intriguing:
I suppose, the improvements from #48 will lead to better figures overall, but it seems like the minification and bundle import needs to be tweaked. |
|
Hmm I don't get those actually, I do get a couple of warnings for DevTools not being able to load SourceMap. Does this pop up straight away or after a certain action? :) |
I also get SourceMap warnings on the DevTool like (on
|
The `ENV` bit appears invalid and causing the script to fail, and normally that's not needed when setting environmental variables on a script execution.
And re-updates the Stylelint ignore list. Re: #55 (comment)
Since `location.pathname` returns `/dev` regardless of the URL ending in `/dev.html` or `/dev` (a fun and surprising thing I know), it's better to check it agains `/dev` (otherwise it will be `false` when someone is on the dev page).
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.
The build works as far as I can see, I looked at the LHCI artifacts from a836a6b (master
) and 3e85816 (this PR) and here's the results (script used mentioned below):
/dev
changes:
Commit | Perf | A11y | BP | SEO | PWA | Average |
---|---|---|---|---|---|---|
a836a6b | 82% | 98% | 79% | 100% | (33.33%, 33.33%, 85.71%) | 73.05% |
3e85816 | -1% | -6% | - | - | (-, -, -) | -1% |
lh-avg '82/98/79/100/(1, 1, 6)' '81/92/79/100/(1, 1, 6)' -psd -f md -n 'a836a6b,3e85816'
/
changes:
Commit | Perf | A11y | BP | SEO | PWA | Average |
---|---|---|---|---|---|---|
a836a6b | 78% | 100% | 79% | 100% | (33.33%, 33.33%, 85.71%) | 72.77% |
3e85816 | +7% | - | - | - | (-, -, -) | +1% |
lh-avg '78/100/79/100/(1, 1, 6)' '85/100/79/100/(1, 1, 6)' -psd -f md -n 'a836a6b,3e85816'
So it does seem that the bundling is improving the performance, however, the dev page's bundle should be looked at.
Note: LHCI does tests on an Emulated Nexus 5X (so mobile versus desktops which I've tested on all along).
@Berkmann18 I see what you mean about the minified versions. They were not supposed to be touched so we only need the minified version. Good call! |
Yeah, otherwise users would have to wait for the full uncompressed resources, which is bad. |
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.
There are still some areas to improve, especially for /dev
but it's better to have this improved version onto production; which would show us even better results, especially for best practices, PWA and quite possibly performance (assuming the relevant resources get a cache policy).
This way, it builds the site based on the correct directory (otherwise it break the deployment).
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.
Thanks Amir!
Since there's been a recent drop in the a11y score (6% drop in #55), it makes sense to improve the relevant contrast
Since there's been a recent drop in the a11y score (6% drop in #55), it makes sense to improve the relevant contrast
Since there's been a recent drop in the a11y score (6% drop in #55), it makes sense to improve the relevant contrast
Closes #50
After doing a bit of research and playing around, I've configured Parcel for the app and modified the structure where necessary. There is now a
client
folder which serves the frontend, and the public directory contains the html entry point.The new structure looks like this:
I have been a little puzzled by this, but I am not too sure if the performance has improved as a result of this. Configuration was definitely pretty straightforward, and it was nice not having to write a bunch of web pack configurations. I think I have ported everything to be under this bundler, but I might have missed some functionalists too.
@Berkmann18 Do you have any early ideas why performance may not be at its best? I guess prod will be faster, but dev looks kind of odd.
Otherwise I can try looking into web pack as well and having a go at it.
TODO:
Update
README
Test Performance