Tanstack Start build size #8191
Unanswered
rossknudsen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I've been trying to build an app using Tanstack Start, Powersync and publish it to Cloudflare Workers. However, I'm running into issues with the resulting build size being too big to release to CF. After looking at the build output, the culprit seems to be that the server build includes a bunch of wasm files that are required by the Powersync on the client. The source of these wasm files is the NPM package
@journeyapps/wa-sqlitewhich the Tanstack installation guide specifies.Now these wasm files are not required on the server, to my knowledge, since they are a dependency of Powersync which is intended to run on the client only (note, the wasm files are in the client and server build output). I've tried a number of different options to elimintate these wasm files from the server output but have failed. I'm not sure which component is the best place to start with this issue. I'm just assuming that the compiler is the best place to start.
To repro this issue, I grabbed a Powersync community maintained example and followed the Cloudflare deployment docs. Here is the result on my fork of the example. If you build this, you should find that the server build contains all of the wasm files as discussed above.
Any thoughts on where I'm going wrong?
All reactions