IT’S COMPILING IN VITE
Conversation
Notices
-
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Tuesday, 17-Jan-2023 13:26:09 JST Alex Gleason -
Embed this notice
opal hart (opal@ap.maladaptive.art)'s status on Tuesday, 17-Jan-2023 13:32:06 JST opal hart @alex how are you and your self-documenting variable names going Alex Gleason likes this. -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Tuesday, 17-Jan-2023 13:32:14 JST Alex Gleason @opal prettyWellHowAboutYou?
-
Embed this notice
opal hart (opal@ap.maladaptive.art)'s status on Tuesday, 17-Jan-2023 13:33:40 JST opal hart @alex im doing better actually since this morning Alex Gleason likes this. -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Tuesday, 17-Jan-2023 14:10:14 JST Alex Gleason @e How do I do dumb shit like this in Vite? https://gitlab.com/soapbox-pub/soapbox/-/blob/develop/app/soapbox/utils/code.js
I call git from JS at buildtime to get the current commit. The runtime code is only the exported JSON object. I guess it’s kinda like SSR?
I need a solution for Vite.
-
Embed this notice
ew (e@masochi.st)'s status on Tuesday, 17-Jan-2023 14:13:06 JST ew @colinsmatt11 @alex he's saying it's ssr-like, he wants build-time codegen. there's a few ways to do it, lemme think though In conversation permalink Alex Gleason likes this. -
Embed this notice
MattZ (colinsmatt11@gleasonator.com)'s status on Tuesday, 17-Jan-2023 14:13:07 JST MattZ @alex @e If you want SSR why not use vite-plugin-ssr? In conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Tuesday, 17-Jan-2023 14:16:08 JST ew @colinsmatt11 @alex I think just inside the vite config you would read the git head and then inject it into the meta.env attribute:
https://vitejs.dev/guide/env-and-mode.htmlIn conversation permalink Attachments
Alex Gleason likes this. -
Embed this notice
ew (e@masochi.st)'s status on Tuesday, 17-Jan-2023 14:22:02 JST ew @alex @colinsmatt11 yeah ok so maybe just try setting process.env['VITE_GIT_HEAD'] inside vite.config.js and see if it will pick it up inside meta.env In conversation permalink Alex Gleason likes this. -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Tuesday, 17-Jan-2023 14:23:58 JST Alex Gleason @e @colinsmatt11 Thank you, I can finally replace this dumb file too with that strategy: https://gitlab.com/soapbox-pub/soapbox/-/blob/develop/app/soapbox/build-config.js
I still have a problem with emojis, but… maybe I should resurrect your old MR. ?
In conversation permalink Attachments
-
Embed this notice
Fediverse Contractor (bot@seal.cafe)'s status on Tuesday, 17-Jan-2023 14:24:55 JST Fediverse Contractor Wait what problem with emojis? In conversation permalink -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Tuesday, 17-Jan-2023 14:27:43 JST Alex Gleason @bot @colinsmatt11 It’s all fucked up, and @e wrote us this beautiful MR to fix it 6 months ago that we didn’t merge for no reason, then he created his own frontend.
https://gitlab.com/soapbox-pub/soapbox/-/merge_requests/1572
In conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Tuesday, 17-Jan-2023 14:28:09 JST ew @alex @colinsmatt11 lul yeah. the emoji loading code is a bit spooky. you should look into react 18 streaming as an aside. I'm not sure if we already talked about this but your setup should support it nicely because you're using tailwind css. react 18 streaming is blocked mostly by css-in-js libraries.
https://vite-plugin-ssr.com/streamIn conversation permalink Attachments
Alex Gleason likes this. -
Embed this notice
Fediverse Contractor (bot@seal.cafe)'s status on Tuesday, 17-Jan-2023 14:28:42 JST Fediverse Contractor Just make sure he isn't trying to hack me, but I guess it's fine otherwise. In conversation permalink -
Embed this notice
Fediverse Contractor (bot@seal.cafe)'s status on Tuesday, 17-Jan-2023 14:30:47 JST Fediverse Contractor Does this mean we're going to get animeirls nice emoji picker though? In conversation permalink -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Tuesday, 17-Jan-2023 14:32:55 JST Alex Gleason @bot @colinsmatt11 @e It’s a step towards everything being not completely fucked up with emojis, which would enable us to build the picker we want.
In conversation permalink -
Embed this notice
Fediverse Contractor (bot@seal.cafe)'s status on Tuesday, 17-Jan-2023 14:35:29 JST Fediverse Contractor Who is we? In conversation permalink -
Embed this notice
tassoman (tassoman@gleasonator.com)'s status on Tuesday, 17-Jan-2023 14:44:58 JST tassoman @bot @alex @colinsmatt11 @e It's me and others going through Alex ? I suppose In conversation permalink -
Embed this notice
Fediverse Contractor (bot@seal.cafe)'s status on Tuesday, 17-Jan-2023 14:44:58 JST Fediverse Contractor Emoji reacts should be the top priority imo. In conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Tuesday, 17-Jan-2023 15:19:48 JST ew @alex @colinsmatt11 @bot the masculine urge to rewrite soapbox's i18n, emoji, and reducer code In conversation permalink Attachments
-
Embed this notice
Ako Suminoe :njp: (realakosuminoe@poa.st)'s status on Wednesday, 18-Jan-2023 00:34:24 JST Ako Suminoe :njp: @alex that's static site generation (SSG), not server side rendering (SSR). SSG is when content is statically generated at build time. SSR is when you run JS on the server to fetch content at runtime, and generate the HTML server side with no JS sent to client (unless you are hydrating it later, but that's a different convo).
Because soapbox is a client-side rendered SPA that is getting content over an API from the rebased backend, there should be no SSR here at all.In conversation permalink Alex Gleason likes this. -
Embed this notice
ew (e@masochi.st)'s status on Wednesday, 18-Jan-2023 00:38:46 JST ew @alex @colinsmatt11 @bot >which would enable us to build the picker we want.
were you wanting to roll your own? they are actually surprisingly easy to make. I did one in a few hours for cumfe w/ virtuosoIn conversation permalink Alex Gleason likes this.
-
Embed this notice