Skip to content

Commit

Permalink
Merge branch 'dev' into v2
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed Mar 16, 2023
2 parents 404ede8 + 4b70f9f commit 2f095cd
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
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
25 changes: 22 additions & 3 deletions packages/remix-dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,8 @@ const resolveServerBuildPath = (

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

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

Expand All @@ -676,9 +678,26 @@ let listFormat = new Intl.ListFormat("en", {
type: "conjunction",
});

export let browserBuildDirectoryWarning = `⚠️ DEPRECATED: The \`browserBuildDirectory\` config option is deprecated. Use \`assetsBuildDirectory\` 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.`;
export let browserBuildDirectoryWarning =
"⚠️ DEPRECATED: The `browserBuildDirectory` config option is deprecated. " +
"Use `assetsBuildDirectory` 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.";

export const errorBoundaryWarning =
"⚠️ DEPRECATED: The separation of `CatchBoundary` and `ErrorBoundary` has " +
Expand Down

0 comments on commit 2f095cd

Please sign in to comment.