Skip to content

Update SvelteKit v1 devCommand#11494

Merged
kodiakhq[bot] merged 4 commits intomainfrom
amyegan-sveltekit-dev
Jul 1, 2024
Merged

Update SvelteKit v1 devCommand#11494
kodiakhq[bot] merged 4 commits intomainfrom
amyegan-sveltekit-dev

Conversation

@amyegan
Copy link
Copy Markdown
Contributor

@amyegan amyegan commented Apr 25, 2024

The current development command for the SvelteKit (v1) preset causes CORS errors in some cases. Overriding this command to exclude --port $PORT resolves the issue.

See https://github.com/orgs/vercel/discussions/3390 for background info

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 25, 2024

🦋 Changeset detected

Latest commit: 926649a

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

This PR includes changesets to release 2 packages
Name Type
@vercel/frameworks Patch
@vercel/fs-detectors 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

@trek
Copy link
Copy Markdown
Contributor

trek commented Apr 26, 2024

@amyegan do you know if this used to work in older Svelte versions? If so one risk of changing this is if someone deploys an older version of SvelteKit it would break for them.

@amyegan
Copy link
Copy Markdown
Contributor Author

amyegan commented Apr 26, 2024

@amyegan do you know if this used to work in older Svelte versions? If so one risk of changing this is if someone deploys an older version of SvelteKit it would break for them.

@trek Good question. I know that the current default dev command has been causing problems for the community since 26 July 2023 (around version 1.20.5), and possibly earlier than that.

I tried just now with version 1.0.0 which also seems to throw CORS errors on local with the default dev command and seems to work as desired with any of the overrides I have found to work with the latest version. My best guess is that it never worked as expected for v1 in certain situations.

For recent versions my workaround is to override the default dev command with vite, vite --port 3000, or vite --cors false. Certainly open to other solutions. Just went for the simplest one I've found 😅

@EndangeredMassa EndangeredMassa added the pending-merge ready to merge, but waiting for some reason label Jun 26, 2024
@kodiakhq kodiakhq bot merged commit 1484df7 into main Jul 1, 2024
@kodiakhq kodiakhq bot deleted the amyegan-sveltekit-dev branch July 1, 2024 17:44
feugy pushed a commit that referenced this pull request Jul 2, 2024
The current development command for the SvelteKit (v1) preset causes CORS errors in some cases. Overriding this command to exclude `--port $PORT` resolves the issue.

See https://github.com/orgs/vercel/discussions/3390 for background info
EndangeredMassa pushed a commit that referenced this pull request Jul 3, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @vercel/build-utils@8.3.0

### Minor Changes

- Adds the ability for builders to define a `diagnostics` step that is
called after the build operation is done.
([#11653](#11653))
    Implements the diagnostics step in the `next` builder.

### Patch Changes

- Add resolved node version range to warning message
([#11742](#11742))

## vercel@34.3.0

### Minor Changes

- introduce --logs flag for deploy and inspect command to display build
logs ([#11672](#11672))

- Adds the ability for builders to define a `diagnostics` step that is
called after the build operation is done.
([#11653](#11653))
    Implements the diagnostics step in the `next` builder.

### Patch Changes

- Updated dependencies
\[[`394eddb2a`](394eddb),
[`b9d18c583`](b9d18c5),
[`77836e3c3`](77836e3),
[`11d0a32d8`](11d0a32)]:
    -   @vercel/build-utils@8.3.0
    -   @vercel/next@4.3.0
    -   @vercel/remix-builder@2.1.9
    -   @vercel/redwood@2.1.0
    -   @vercel/node@3.2.1
    -   @vercel/static-build@2.5.12

## @vercel/next@4.3.0

### Minor Changes

- Adds the ability for builders to define a `diagnostics` step that is
called after the build operation is done.
([#11653](#11653))
    Implements the diagnostics step in the `next` builder.

## @vercel/redwood@2.1.0

### Minor Changes

- Add support for API endpoint configuration via `export const config`
syntax ([#11776](#11776))

## @vercel/client@13.2.10

### Patch Changes

- Updated dependencies
\[[`394eddb2a`](394eddb),
[`b9d18c583`](b9d18c5)]:
    -   @vercel/build-utils@8.3.0

## @vercel/frameworks@3.0.3

### Patch Changes

- Update SvelteKit v1 devCommand
([#11494](#11494))

## @vercel/fs-detectors@5.2.5

### Patch Changes

- Updated dependencies
\[[`1484df7aa`](1484df7)]:
    -   @vercel/frameworks@3.0.3

## @vercel/gatsby-plugin-vercel-builder@2.0.34

### Patch Changes

- Updated dependencies
\[[`394eddb2a`](394eddb),
[`b9d18c583`](b9d18c5)]:
    -   @vercel/build-utils@8.3.0

## @vercel/node@3.2.1

### Patch Changes

- Updated dependencies
\[[`394eddb2a`](394eddb),
[`b9d18c583`](b9d18c5)]:
    -   @vercel/build-utils@8.3.0

## @vercel/remix-builder@2.1.9

### Patch Changes

- Update `@remix-run/dev` fork to v2.10.0
([#11771](#11771))

## @vercel/static-build@2.5.12

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/gatsby-plugin-vercel-builder@2.0.34

## @vercel-internals/types@1.0.39

### Patch Changes

- Updated dependencies
\[[`394eddb2a`](394eddb),
[`b9d18c583`](b9d18c5)]:
    -   @vercel/build-utils@8.3.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
feugy pushed a commit that referenced this pull request Jul 4, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @vercel/build-utils@8.3.0

### Minor Changes

- Adds the ability for builders to define a `diagnostics` step that is
called after the build operation is done.
([#11653](#11653))
    Implements the diagnostics step in the `next` builder.

### Patch Changes

- Add resolved node version range to warning message
([#11742](#11742))

## vercel@34.3.0

### Minor Changes

- introduce --logs flag for deploy and inspect command to display build
logs ([#11672](#11672))

- Adds the ability for builders to define a `diagnostics` step that is
called after the build operation is done.
([#11653](#11653))
    Implements the diagnostics step in the `next` builder.

### Patch Changes

- Updated dependencies
\[[`394eddb2a`](394eddb),
[`b9d18c583`](b9d18c5),
[`77836e3c3`](77836e3),
[`11d0a32d8`](11d0a32)]:
    -   @vercel/build-utils@8.3.0
    -   @vercel/next@4.3.0
    -   @vercel/remix-builder@2.1.9
    -   @vercel/redwood@2.1.0
    -   @vercel/node@3.2.1
    -   @vercel/static-build@2.5.12

## @vercel/next@4.3.0

### Minor Changes

- Adds the ability for builders to define a `diagnostics` step that is
called after the build operation is done.
([#11653](#11653))
    Implements the diagnostics step in the `next` builder.

## @vercel/redwood@2.1.0

### Minor Changes

- Add support for API endpoint configuration via `export const config`
syntax ([#11776](#11776))

## @vercel/client@13.2.10

### Patch Changes

- Updated dependencies
\[[`394eddb2a`](394eddb),
[`b9d18c583`](b9d18c5)]:
    -   @vercel/build-utils@8.3.0

## @vercel/frameworks@3.0.3

### Patch Changes

- Update SvelteKit v1 devCommand
([#11494](#11494))

## @vercel/fs-detectors@5.2.5

### Patch Changes

- Updated dependencies
\[[`1484df7aa`](1484df7)]:
    -   @vercel/frameworks@3.0.3

## @vercel/gatsby-plugin-vercel-builder@2.0.34

### Patch Changes

- Updated dependencies
\[[`394eddb2a`](394eddb),
[`b9d18c583`](b9d18c5)]:
    -   @vercel/build-utils@8.3.0

## @vercel/node@3.2.1

### Patch Changes

- Updated dependencies
\[[`394eddb2a`](394eddb),
[`b9d18c583`](b9d18c5)]:
    -   @vercel/build-utils@8.3.0

## @vercel/remix-builder@2.1.9

### Patch Changes

- Update `@remix-run/dev` fork to v2.10.0
([#11771](#11771))

## @vercel/static-build@2.5.12

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/gatsby-plugin-vercel-builder@2.0.34

## @vercel-internals/types@1.0.39

### Patch Changes

- Updated dependencies
\[[`394eddb2a`](394eddb),
[`b9d18c583`](b9d18c5)]:
    -   @vercel/build-utils@8.3.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-merge ready to merge, but waiting for some reason

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants