-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
chore: rm function dir in template ignore files #1436
Conversation
Hmm, I think other adapters such as It's cool to see this adapter. You should list it on https://github.com/sveltejs/integrations or https://sveltesociety.dev/ 😄 |
@benmccann My argument/proposition would be that the template apps should only ignore files in the template and not pre-empt output distinct to some adapters.
I am not asking for my specific requirement to be supported here, just that no specific requirements of adapters supported in the SvelteKit template. Processes like Svelte Adders are perfect to address this for all adapters adding to ignore files as necessary.
I will add links to the adapter once SvelteKit is 1.0 as I'm already overwhelmed with user reported issues and keeping the adapter updated to latest SvelteKit changes. |
I hear what you're saying and it's a pretty reasonable to suggest that the template not have any adapter-specific code in it. At the same time we want to make setup really easy and don't want to have to create svelte adders just to use an adapter. And there should be some consistency between the different adapters as well. It would be preferable not to have the functions directory generated in some cases and written by hand in other cases. It's also a design goal that you should mostly be able to write a SvelteKit app, swap the adapter, and have it work on another hosting platform. I think the issue here is that the Firebase adapter doesn't have support for SvelteKit endpoints yet (https://github.com/jthegedus/svelte-adapter-firebase#faq). My preference would be that we try to fix that and make the |
I would agree, except that Netlify (by default) specifies
This is actually untrue, endpoints are supported. The confusion here comes from the initial comparison of SvelteKit endpoints to Next.js API routes. Next.js routes on Vercel are each individual AWS Lambdas. The initial comparison lead me to believe the
I need to update the FAQ, it was written quite a while ago in terms of SvelteKit releases. With that explanation, hopefully you see this is nothing to do with the adapter, but in fact, the target platforms. Netlify & Firebase (by default) use the same dir for similar but incompatible reasons. My argument is again, that a single first-party-maintained adapter, should not force the SvelteKit template In addition to this, the Netlify I am just trying to avoid writting code or instructions to work around this issue. atm I have written code or have extra steps in my instructions to work around 3 separate issues. |
Perhaps part of the adapter API should be a utility function to check & write ignore items to the SvelteKit root |
Yeah, that sounds like a reasonable solution. I'd be in favor of this change if we can make the other adapters check and modify the |
This change has since been implemented in #1499 whether by accident or not, I agree with the change 😉 |
Remove
/function
from the ignore file.This seems to no longer be used for anything and currently conflicts with the Firebase Adapter
standarddefault usage (Cloud Functions are defined by a dir calledfunctions
but is configurable) so requires a documentation/manual step to rectify.Before submitting the PR, please make sure you do the following
Tests
pnpm test
and lint the project withpnpm lint
Changesets
pnpx changeset
and following the prompts