oneiro
Anyone using SolidStart in production?
I am currently using it for a project and so far it has been working out fine. Though the docs are still a bit lacking and you have to be aware that breaking changes on newer versions are to be expected. However the community on this discord server is really helpful. So far I've always been able to resolve any issues I encountered relatively quickly.
44 replies
What's the best way to debug `Buffer is not defined`
For example:
I have a file
src/pages/myPage/routeData.ts
.
This looks like this:
The reason for this is, because I want to integration test getRouteData
in isolation.
Inside my src/routes/myPage.tsx
I export route data like this:
Now here's the issue:
1. when I do it the way I described, I receive the Buffer is not defined
issue
2. when I move routeData
into the src/routes/myPage.tsx
file it works correctly
3. when I instead move the getRouteData
-function into routeData()
as arrow function it also works
2. Is not a good option, because when I want to get the typing when using useRouteData
inside subcomponents I would create a circular dependency between the route and its sub-components. This is why I want to move routeData
out of the route in the first place
3. is not a good option, because I loose the ability to integration test my server side logic without running the solid-start server.3 replies
How to properly import fonts (with Tailwind)
so for some reason only two of the fonts are inside the directory (probably because of tree-shaking and because the third fontweight isn't being used). However interestingly enough some fonts seem to be imported correctly and one fontweight doesn't.
This is probably the issue here: the fontweight is also never used (i guess) which is why it isn't bundled properly, but the import inside the css file remains, which leads to the error. I'll have to check something and make a deployment. I'll report back in a second 🙂 👍 (thanks for helping out btw!)
30 replies
How to properly import fonts (with Tailwind)
@giyomoon actually I am having a weird issue with the font as well:
My fonts dir is located in
src/fonts
and I import them with url("./fonts/...")
.
This works well during development, however for some reason in production the browser tries to access the fonts via "<domain>/assets/fonts
instead of "<domain>/fonts"
>
Do you have any idea where the assets
part inside the resolved path is coming from?30 replies