-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] sveltekit vercel adapter does not bundle paraglide, leading to unresolvable imports #1485
[bug] sveltekit vercel adapter does not bundle paraglide, leading to unresolvable imports #1485
Comments
/bounty $200 |
💎 $200 bounty created by samuelstroschein
|
Which repo is this regarding? I'm failing to see any payment-delivery file in the monorepo. |
This comment was marked as outdated.
This comment was marked as outdated.
@rishi-raj-jain a repo from a user. the issue can be replicated with a sveltekit starter template that uses the vercel adapter and deploys to vercel. The bounty was meant for a community user of ours who faces the issue. Reproducing the error without context is likely difficult for you. Don't know if it's worth your time. |
I'd love to know the issue exactly, and then help solve it. Does that sound good? Where's the template where I can try to reproduce the same? |
@rishi-raj-jain you should be able to replicate the issue with this example https://github.com/inlang/monorepo/tree/main/inlang/source-code/paraglide/paraglide-js-adapter-sveltekit/example if you change the sveltekit adapter to vercel I believe the bugfix is on SvelteKit's side btw, not ours. |
Btw, are you using Vercel edge or serverless adapter? |
The issue is with how you're deploying the app. I've just deployed it working at https://example-rishi-raj-jain.vercel.app/en. As you'd know it needs the monorepo to refer to the packages, or are you deploying that template in an isolated environment which is seperate from it's monorepo? By default, if you just cd to the repo and deploy it to vercel, vercel uploads the code to their platform in case of which, only the starter is sent to Vercel's Code Source and not your repo, hence it's not able to find (as below). If so, you should update the workflows to do something like ![]() ![]() |
@rishi-raj-jain, interesting observation that you can deploy to vercel. I should have clarified that we don't have deployment issues. Users (with own repositories;not our monorepo) have deployment issues. See this discord thread. The fix therefore seems unrelated. If you really want to solve this issue, try to deploy an individual repository to vercel that fetches the paraglide dependency from NPM. Maybe the user in the discord thread can share the repo with you. From my observation, the root cause seems that the vercel adapter does not bundle paraglide-js as indicated by the screenshot. Sorry for the lack of context, the bounty was initially meant for the community member in the Discord thread. |
Would you be open to giving it to me if I solve it? |
I hope @samuelstroschein can give you the bounty @rishi-raj-jain :-) |
Yes, of course! |
This is solved!
Steps to run:
|
TLDRThe main change is
Explanation in detailAs the compiled-output folder is already transpiled, using noExternal with vite becomes necessary to be used so that is not left out while bundling. More specifically, the issue was due to exclusion of the file |
🎉🎈 @rishi-raj-jain has been awarded $200! 🎈🎊 |
Problem
The SvelteKit Vercel adapter does not bundle paraglide imports.
node_modules
which likely leads to this problem. The paraglide import can't be resolved.Expected behavior
The bundler processes the paraglide imports instead of leaving them as is.
Reproduction
TODO
Other information
I suspect the
package.exports
might play a role here. SvelteKit doesn't use the TypeScript compiler option moduleResolution: Node16 or Bundler yet by default. It might be that the Vercel adapter ignores export maps altogether. A reproduction could be a mock package with exports fields and see how the Vercel adapter behaves.The text was updated successfully, but these errors were encountered: