Skip to content

Commit

Permalink
feat(remix-dev): show deprecation warning when serverBuildDirectory
Browse files Browse the repository at this point in the history
… config is used
  • Loading branch information
MichaelDeBoey committed Mar 8, 2023
1 parent 96813db commit e933a19
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/wild-beers-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": minor
---

show deprecation warning when `serverBuildDirectory` config is used
5 changes: 4 additions & 1 deletion packages/remix-dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,8 @@ const resolveServerBuildPath = (

// retain deprecated behavior for now
if (appConfig.serverBuildDirectory) {
warnOnce(serverBuildDirectoryWarning, "serverBuildDirectory");

serverBuildPath = path.join(appConfig.serverBuildDirectory, "index.js");
}

Expand All @@ -731,6 +733,7 @@ let listFormat = new Intl.ListFormat("en", {
type: "conjunction",
});

export let serverBuildTargetWarning = `⚠️ DEPRECATED: The "serverBuildTarget" config option is deprecated. Use a combination of "publicPath", "serverBuildPath", "serverConditions", "serverDependenciesToBundle", "serverMainFields", "serverMinify", "serverModuleFormat" and/or "serverPlatform" instead.`;
export let serverBuildDirectoryWarning = `⚠️ DEPRECATED: The \`serverBuildDirectory\` config option is deprecated. Use \`serverBuildPath\` instead.`;
export let serverBuildTargetWarning = `⚠️ DEPRECATED: The \`serverBuildTarget\` config option is deprecated. Use a combination of \`publicPath\`, \`serverBuildPath\`, \`serverConditions\`, \`serverDependenciesToBundle\`, \`serverMainFields\`, \`serverMinify\`, \`serverModuleFormat\` and/or \`serverPlatform\` instead.`;

export let flatRoutesWarning = `⚠️ DEPRECATED: The old nested folders route convention has been deprecated in favor of "flat routes". Please enable the new routing convention via the \`future.v2_routeConvention\` flag in your \`remix.config.js\` file. For more information, please see https://remix.run/docs/en/main/file-conventions/route-files-v2.`;

0 comments on commit e933a19

Please sign in to comment.