Skip to content
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

Added option to sveltekit vite project to adjust root #13027

Closed
wants to merge 6 commits into from

Conversation

cromefire
Copy link

@cromefire cromefire commented Nov 19, 2024

Properly fixes #12499 (or at least hotfixes it).

Just provides an option to change the root as svelte ignores vite's root setting...

No idea how to write a test for this with the current setup.


Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

Copy link

changeset-bot bot commented Nov 19, 2024

🦋 Changeset detected

Latest commit: 888dffa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Rich-Harris
Copy link
Member

preview: https://svelte-dev-git-preview-kit-13027-svelte.vercel.app/

this is an automated message

Copy link
Member

@benmccann benmccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems from #12499 (comment) that you're arguing we should respect the options in the Vite config. But if that's so, then I would expect root to be read from the Vite config (https://vite.dev/config/shared-options.html#root) instead of specified in a new location. It's already hard enough that we have a Svelte config and Vite config. I don't particularly want to add a third location to specify configuration options

@cromefire
Copy link
Author

I mean yeah, ideally, but it's beyond my capabilities to get that working, so this is at least something simple that does work... If you are capable of properly fixing it, it'd definitely be better.

@benmccann
Copy link
Member

Well there's 745 open issues, so it's not likely I'll get to that particular one

But I'm afraid I'm going to have to close this given the approach

@benmccann benmccann closed this Nov 20, 2024
@cromefire
Copy link
Author

cromefire commented Nov 20, 2024

Doesn't really help (the already pretty terrible) dev experience when getting an actual production application to properly work... Gotta say the more I use it it seems that svelte is really just designed to be used as a demo framework to get a prototype onto vercel, once you go only slightly off that path it seems nobody actually tested anything... You actually want a proper maintainable architecture? Use turborepo, except it doesn't have any concept of dependencies... Well then use trusty ol' NX? Well this happens. How are you actually supposed to work with this?

@DannyvanHolten
Copy link

Hey @benmccann. Is there any direction you are thinking of? I don't know If I can be of direct help, but I'm willing to put in some hours in December, to get to know how this works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to use Sveltekit in a mono-repository context such as with Nx
4 participants