Skip to content

Conversation

@teemingc
Copy link
Member

@teemingc teemingc commented Jun 27, 2025

reverts #13915

This PR replaces manualChunks with inlineDynamicImports for bundling a single JS file (for 'single' and 'inline' apps) since manualChunks does not work when used with Rolldown (it's also a deprecated option). Luckily, inlineDynamicImports: true works in both Rollup and Rolldown for creating a single JS file.

Also bumps the VPS version for dev deps and resolves a todo


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.
    • a test already exists for checking a single JS bundle has been output

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.

@changeset-bot
Copy link

changeset-bot bot commented Jun 27, 2025

🦋 Changeset detected

Latest commit: 5318c87

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

@teemingc teemingc marked this pull request as draft June 27, 2025 14:52
@teemingc teemingc marked this pull request as ready for review June 27, 2025 15:14
@benmccann
Copy link
Member

I'm a little hesitant about this as I'm not sure what effect removing () => ''bundle' might have. If vitejs/rolldown-vite#285 is fixed quickly, that might be the better way to address this

@teemingc teemingc added the vite label Jun 30, 2025
@svelte-docs-bot
Copy link

@teemingc
Copy link
Member Author

teemingc commented Jul 4, 2025

I'm a little hesitant about this as I'm not sure what effect removing () => ''bundle' might have. If vitejs/rolldown-vite#285 is fixed quickly, that might be the better way to address this

Re rolldown/rolldown#5161 (comment) manualChunks is not recommended going forward so I’ll have to modify this PR to use manualChunks with rollup and without for rolldown

@teemingc teemingc requested a review from benmccann July 8, 2025 07:49
@teemingc teemingc requested a review from benmccann July 10, 2025 03:46
@benmccann
Copy link
Member

Just a note for myself: rolldown/rolldown#5161 (comment) suggested to use advancedChunks: https://rolldown.rs/guide/in-depth/advanced-chunks#advanced-chunks, but I guess inlineDynamicImports can be used to the same effect: https://rollupjs.org/configuration-options/#output-inlinedynamicimports

@benmccann benmccann force-pushed the fix-rolldown-single-bundle branch from 5318c87 to 84d4eb9 Compare July 13, 2025 14:46
@benmccann benmccann merged commit 8692d98 into main Jul 13, 2025
24 of 38 checks passed
@benmccann benmccann deleted the fix-rolldown-single-bundle branch July 13, 2025 14:58
@github-actions github-actions bot mentioned this pull request Jul 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants