Skip to content

Commit

Permalink
refactor(dev): rename devHttpOrigin -> devOrigin
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori committed May 25, 2023
1 parent bb1c531 commit 310e9c0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/remix-dev/cli/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export async function build(
};
if (mode === "development" && config.future.unstable_dev) {
let origin = await resolveDevOrigin(config);
options.devHttpOrigin = origin;
options.devOrigin = origin;
}

fse.emptyDirSync(config.assetsBuildDirectory);
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-dev/compiler/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type Options = {
onWarning?: (message: string, key: string) => void;

// TODO: required in v2
devHttpOrigin?: {
devOrigin?: {
scheme: string;
host: string;
port: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-dev/compiler/server/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const createEsbuildConfig = (
ctx.config.devServerPort
),
"process.env.REMIX_DEV_HTTP_ORIGIN": JSON.stringify(
ctx.options.devHttpOrigin ?? "" // TODO: remove nullish check in v2
ctx.options.devOrigin ?? "" // TODO: remove nullish check in v2
),
},
jsx: "automatic",
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-dev/compiler/server/plugins/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ ${Object.keys(config.routes)
export const publicPath = ${JSON.stringify(config.publicPath)};
export const entry = { module: entryServer };
${
options.devHttpOrigin
options.devOrigin
? `export const dev = ${JSON.stringify({
port: options.devHttpOrigin.port,
port: options.devOrigin.port,
})}`
: ""
}
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-dev/devServer_unstable/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export let serve = async (
mode: "development",
sourcemap: true,
onWarning: warnOnce,
devHttpOrigin: origin,
devOrigin: origin,
},
},
{
Expand Down

0 comments on commit 310e9c0

Please sign in to comment.