Conversation
67477c3 to
90c34c7
Compare
Closed
jtojnar
referenced
this pull request
Oct 4, 2019
e13e6ad to
2053725
Compare
Member
Author
|
Aargh! With the icons, the generated bundle is huge (2 MB). I tried subsetting the icons like import { fas } from '@fortawesome/free-solid-svg-icons';
library.add(fas.faCog);and then import { faCog } from '@fortawesome/free-solid-svg-icons';
library.add(faCog);but neither of these really made the bundle smaller. Finally I switched to deep imports import { faCog } from '@fortawesome/free-solid-svg-icons/faCog';
library.add(faCog);getting the size back down to 0.4 MB. It turns out Parcel still does not use tree shaking by default, you have to enable it with Well never mind, I have been meaning to get rid of the custom scrollbar for a long time. But, apparently, it also does not support source maps. Welp. |
jtojnar
added a commit
that referenced
this pull request
Oct 5, 2019
Parcel’s tree shaking is shaky: #1013 (comment)
jtojnar
added a commit
that referenced
this pull request
Oct 5, 2019
Parcel’s tree shaking is shaky: #1013 (comment)
jtojnar
added a commit
that referenced
this pull request
Oct 9, 2019
Parcel’s tree shaking is shaky: #1013 (comment)
jtojnar
added a commit
that referenced
this pull request
Oct 11, 2019
Vector icons will look much crisper on HiDPI devices. Using them will also allow us to colour them in a dark theme. We use FontAwesome DOM loading script for now. We will be able to use the `icon` helper directly in JSX when we complete the switch to client side rendering. For size reasons, we are subsetting the icons, so when we want to use an icon not already used, we will need to add it here. But this was true for image files as well. We need to use deep imports for plug-ins, though, since Parcel’s tree shaking is shaky: #1013 (comment) We also no longer depend on parcel-plugin-static-files-copy, since we only used it for icons referrence by <img> tag from PHP templates (not picked up by Parcel).
Vector icons will look much crisper on HiDPI devices. Using them will also allow us to colour them in a dark theme. We use FontAwesome DOM loading script for now. We will be able to use the `icon` helper directly in JSX when we complete the switch to client side rendering. For size reasons, we are subsetting the icons, so when we want to use an icon not already used, we will need to add it here. But this was true for image files as well. We need to use deep imports for plug-ins, though, since Parcel’s tree shaking is shaky: #1013 (comment) We also no longer depend on parcel-plugin-static-files-copy, since we only used it for icons referrence by <img> tag from PHP templates (not picked up by Parcel).
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will make selfoss look crisper on hi-res displays and also allow better
user.csstheming.