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

feat(dev,server-runtime): detect built mode via build.mode #6964

Merged
merged 4 commits into from
Aug 4, 2023

Conversation

pcattori
Copy link
Contributor

Relates to #6891

@changeset-bot
Copy link

changeset-bot bot commented Jul 26, 2023

🦋 Changeset detected

Latest commit: 18bed1f

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

This PR includes changesets to release 18 packages
Name Type
@remix-run/dev Minor
@remix-run/server-runtime Minor
@remix-run/cloudflare Minor
@remix-run/deno Minor
@remix-run/node Minor
@remix-run/react Minor
@remix-run/cloudflare-pages Minor
@remix-run/cloudflare-workers Minor
@remix-run/architect Minor
@remix-run/express Minor
@remix-run/netlify Minor
@remix-run/serve Minor
@remix-run/testing Minor
@remix-run/vercel Minor
create-remix Minor
remix Minor
@remix-run/css-bundle Minor
@remix-run/eslint-config Minor

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

@@ -4,5 +4,5 @@ import * as build from "@remix-run/dev/server-build";
export const onRequest = createPagesFunctionHandler({
build,
getLoadContext: (context) => context.env,
mode: process.env.NODE_ENV,
mode: build.mode,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to simplify createPagesFunctionHandler so we don't have to pass mode anymore and it gets automatically recognized?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceptually, yes, but holding off on that since we are discussing better ways to configure dev-only options than to just lump them all under NODE_ENV=development

@@ -5,7 +5,7 @@ import * as build from "@remix-run/dev/server-build";

const remixHandler = createRequestHandlerWithStaticFiles({
build,
mode: Deno.env.get("NODE_ENV"),
mode: build.mode,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for createRequestHandlerWithStaticFiles?

@pcattori pcattori merged commit 6e250f7 into dev Aug 4, 2023
9 checks passed
@pcattori pcattori deleted the pedro/build-mode branch August 4, 2023 20:36
@github-actions github-actions bot added the awaiting release This issue has been fixed and will be released soon label Aug 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2023

🤖 Hello there,

We just published version v0.0.0-nightly-6e250f7-20230805 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

🤖 Hello there,

We just published version v0.0.0-nightly-a179aa7-20230809 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-b1149bb-20230810 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting release This issue has been fixed and will be released soon CLA Signed package:dev package:server-runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants