Repository navigation
chore: avoid double-bundling - #17068
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/d4d3267b77a505cf6dca5b209e615c23b5616b9fOpen in |
🦋 Changeset detectedLatest commit: d4d3267 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 |
| return { | ||
| environments: { | ||
| ssr: { | ||
| // TODO: replace build-time constants in the adapter's own entrypoints only, so that identifiers in the app or its dependencies aren't accidentally replaced |
There was a problem hiding this comment.
need to figure out how to apply the defines only to our own entrypoints. probably by adding a transform hook again rather than using defines here?
| // pass means shared modules (e.g. `SvelteKitError` from `@sveltejs/kit`) | ||
| // aren't duplicated. See https://github.com/sveltejs/kit/issues/15755 | ||
| input: { | ||
| // TODO: adapter-index.js should be index.js but we need to avoid overridding the sveltekit one |
There was a problem hiding this comment.
need to resolve this so that we can run node build rather than node build/adapter-index.js
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
(oops, approved while platform-tests are still red. still, looks good apart from whatever's causing those) |
|
I have some of those fixes locally so I’ll push those up soon EDIT: pushed |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…emingc-adapter-regression-tests-version-3
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…emingc-adapter-regression-tests-version-3
elliott-with-the-longest-name-on-github
left a comment
There was a problem hiding this comment.
well this is cool
| written.map((file) => extname(file)).filter((ext) => ext && !compressed_extensions.has(ext)) | ||
| ); | ||
|
|
||
| builder.log.minor('Building server'); |
There was a problem hiding this comment.
did we intentionally lose this log?
There was a problem hiding this comment.
Yeah I didn’t think we needed it now that we have no second bundling step. At least I don’t think we log this for other adapters (maybe because they have “generating serverless function” instead 🤔)
03f7b48
into
version-3
stacked on #17068 closes #10040 Adapter builders can copy generated sourcemaps to a different directory, leaving relative source paths pointing at the wrong path. This PR rebases relative `sources` and `sourceRoot` values during copies while preserving absolute paths, URLs, mappings, indexed-map structure, and unchanged map text when no rewrite is needed. An alternative is to use the Rolldown `sourcemapPathTransform` hook but that makes them invalid for vite preview https://rolldown.rs/reference/OutputOptions.sourcemapPathTransform --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [x] 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 - [x] This message body should clearly illustrate what problems it solves. - [x] 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 - [x] 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 - [x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
…17103) #17068 injects the values `adapt` learns after the Vite build by regex-patching stub identifiers in the built chunks and remapping their sourcemaps. Now `adapt` writes them to `build/adapter-node.js` and the chunks import it. No chunk is edited after Vite writes it, and the adapter has no runtime dependencies.
stacked on top of #17077
This PR gets rid of the second bundle step in the Node adapter in favour of configuring the Vite build.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits