-
-
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
feat: add `bundleStrategy: 'inline' #13193
Conversation
🦋 Changeset detectedLatest commit: 37c8787 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
preview: https://svelte-dev-git-preview-kit-13193-svelte.vercel.app/ this is an automated message |
what is the play for routes? Does each route get its own bundled code, or is there one bundled codebase that is then just put into all pages? I was gonna ask about dynamic routes, but I'm assuming they aren't possible with this either way I'm assuming. |
One bundle. It doesn't impose any restrictions on what kind of app you can build, just means that the bundle size is correlated to app size |
This doesn't seem to work for me at all. It may work by chance if you prerender the entry point, but if you don't, or navigate anywhere in the app, then everything breaks:
|
It doesn't work after merging the hash based routing PR — I have some changes locally, and a test app that works perfectly |
This is something of an experiment. The idea is that, building on top of #13173, it should be possible to bundle a SvelteKit app right into the HTML, so that you can literally just double-click an
app.html
file.Most apps shouldn't be built this way! But there are certain use cases where it's kinda fun — imagine being able to build a game and literally email it to your friends, without needing to host it somewhere.
This PR has no tests yet and there are probably some things that don't work correctly. It may turn out that there are insurmountable technical challenges, I don't know yet.
If this works, it should basically close #907, though there may be some wrinkles around
.html
extensions depending on how the app is consumed.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.Edits