drilkmops
RReactiflux
•Created by drilkmops on 8/19/2024 in #help-js
drilkmops – 15-59 Aug 19
Even the wasm itself is quite large without any data. Like 400kb. Gonna talk to some coworkers who are more in the realm of rust/wasm.
It’s hard to not see that and be all “alarm bells” even though I know the size is only a portion.
42 replies
RReactiflux
•Created by drilkmops on 8/19/2024 in #help-js
drilkmops – 15-59 Aug 19
Ahh, I think I get what you’re saying. It’s not too hard for me to split up the locales and generate them individually.
But getting smaller than that down to the individual string level might get a bit wonky
42 replies
RReactiflux
•Created by drilkmops on 8/19/2024 in #help-js
drilkmops – 15-59 Aug 19
Cook a little more on that last paragraph. I think I half understand there
42 replies
RReactiflux
•Created by drilkmops on 8/19/2024 in #help-js
drilkmops – 15-59 Aug 19
It’s basically just displaying the strings to the end user. Formatting from a standard to specific with a locale
42 replies
RReactiflux
•Created by drilkmops on 8/19/2024 in #help-js
drilkmops – 15-59 Aug 19
CDN will be fast af anyway
42 replies
RReactiflux
•Created by drilkmops on 8/19/2024 in #help-js
drilkmops – 15-59 Aug 19
I’m sure we have a way to do a CDN just fine at work to. Honestly that might be the move. Just fetch the locale blob we need from a cdn and bundle whatever data they need
42 replies
RReactiflux
•Created by drilkmops on 8/19/2024 in #help-js
drilkmops – 15-59 Aug 19
Where would the assets be loaded from? Like would vite be packaging all of that and load it dynamically? Or would I do a cdn route? Cuz we got like 1.5mb and growing of locale data. I know we can reduce it, but trying to think of cleaner ways now.
Previously it required an external cal to convert their data. And they don’t want that.
42 replies
RReactiflux
•Created by drilkmops on 8/19/2024 in #help-js
drilkmops – 15-59 Aug 19
That’s good feedback regardless tbh.
42 replies
RReactiflux
•Created by drilkmops on 8/19/2024 in #help-js
drilkmops – 15-59 Aug 19
Tbf it does make sense if we step back haha. We want a single localization solution across all our stacks. We can compile this into whatever language.
42 replies
RReactiflux
•Created by drilkmops on 8/19/2024 in #help-js
drilkmops – 15-59 Aug 19
We’re wrapping icu4x
https://github.com/unicode-org/icu4x
42 replies
RReactiflux
•Created by drilkmops on 8/19/2024 in #help-js
drilkmops – 15-59 Aug 19
More context, I work at a big company and we can be a bit opinionated.
42 replies
RReactiflux
•Created by drilkmops on 8/19/2024 in #help-js
drilkmops – 15-59 Aug 19
Ours is a bit more abstract since I’m writing some Rust that convert into wasm and typescript methods to call the wasm.
42 replies
RReactiflux
•Created by drilkmops on 4/12/2023 in #help-js
✅ – drilkmops – 23-31 Apr 12
So a solution would look something like this
5 replies
RReactiflux
•Created by drilkmops on 4/12/2023 in #help-js
✅ – drilkmops – 23-31 Apr 12
Looks like I can use
eval()
or new Function
and pass in the things in the script tag. Neat!5 replies