Closed martinklepsch closed 5 years ago
Not entirely sure if what I did is correct but it seemed the repo was in a slightly broken state.
index.js
wasn't added to the now build causing the missing require pasted abovegh-pages
branch. I updated the repo and pinned napa
against a specific commit in order to make the build more predictable.
0 0 16 16
to 0 0 24 24
which I updated in lib/Icon.js
.There's a running deployment of this here: https://microicon-yintbnpbdc.now.sh
I think we could still increase the max-age
to maybe 12 or 24 hours since the assets are really mostly static but not sure if you have any preferences in the regard.
Happy to drop individual commits, rebase, squash or whatever else you'd like.
Thanks! Yeah, I haven’t touched this in a while so it doesn’t surprise me that simple icons went out of sync; it wasn’t on npm when I put this up. I think the caching could be more aggressive like you suggested and I can also get automatic now deploys set up on another branch if that’s helpful
I figured out the deployment issues so the branch deploys aren't necessary (for me).
it wasn’t on npm when I put this up
I wasn't aware it's on npm. The changes I made still use napa
to copy it into node_modules
. Would you prefer it to use the npm package?
I think the caching could be more aggressive like you suggested
Should we set max-age to 24hrs and ship this?
It looks like it's published now, but haven't tested it out: https://www.npmjs.com/package/simple-icons
Yeah I found that package as well... I’ll take a look at removing the napa
stuff and replacing it with the npm package. 👍
@jxnblk Added another commit that removes napa
, available under https://microicon-cmpilmdzgj.now.sh.
Let me know if anything else needs to be done before this can get merged 👍
Thanks for this! Going to merge this in and set up automatic deploys on another branch
@jxnblk Hey Brent, just wanted to check in if you had a chance to deploy this? I'm still seeing requests being returned without a Cache-Control
header.
Ping 🙂
I tried to deploy the updates, but something is causing the build to fail on Now. Haven’t had much time to dig in
Could you provide more details in what way the build is failing?
EDIT I was able to deploy from master
just fine: https://microicon-cmpilmdzgj.now.sh
BTW, I looked into using Now 2.0 but there are currently some limitations with regards to the size of node_modules
and the bundle in general. material-design-icons
is unfortunately exceeding the limits with its 356M.
https://spectrum.chat/thread/954196ab-a020-46e8-ad33-f10595b9878d
Hey Brent, sorry for bothering you again but have you had a chance to try deploying to Now again or could share some more details on the problems you encountered during deployment?
Hey Brent, sorry for pinging again, just wanted to see if there's anything I could do to help get this into production. I don't have much experience with Now but maybe you can also create a team for this project and add me to it so I could look into the deployment issues you described.
Cheers
Bump 🙂
Fixes #5
Set's the
Cache-Control
header to 3600s / 1hr. This should improve performance for icon delivery by allowing Now's CDN to cache responses for up to one hour.Potentially the max-age setting could be more aggressive since the data doesn't really change all that much? 3hrs? 12hrs? 3days?
I wasn't able to test this on now.sh yet (getting the error below when running
now
, see deployment) but the change is fairly straightforward so maybe that's ok? 😄