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

vite: typesafe server build #8844

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft

Conversation

pcattori
Copy link
Contributor

@pcattori pcattori commented Feb 21, 2024

Fixes #8343

import path from "node:path"
import { getServerBuild } from "@remix-run/node"

const buildPath = path.resolve("./build/server/index.js")
const build = await getServerBuild(buildPath, { viteDevServer })

app.all("*", createRequestHandler({ build }));

Copy link

changeset-bot bot commented Feb 21, 2024

⚠️ No Changeset found

Latest commit: b4d5e62

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@pcattori pcattori marked this pull request as draft February 21, 2024 21:06
@pcattori pcattori force-pushed the pedro/vite-typesafe-server-build branch from 1ca842d to a7d62c4 Compare February 21, 2024 21:17
@pcattori

This comment was marked as outdated.

@pcattori pcattori force-pushed the pedro/vite-typesafe-server-build branch from 9b395f9 to 4106883 Compare February 22, 2024 03:27
I think `vite-basename-test` tests that are failing are sharing
resources that should be isolated. Right now we're relying on
side-effects for setting `port` and `cwd` between tests which I think is
the root cause of the error especially since the only test for `express
build` that passes is the one that _doesn't_ share resources with other
tests.

Haven't looked into other failures, but my guess is its the same thing.
Probably would be fixed if we use our new Vite test fixtures.
@lilouartz
Copy link

Subscribing. Relevant for what I am doing. Thank you!

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

Successfully merging this pull request may close these issues.

3 participants