Skip to content

Commit

Permalink
feat(remix-dev): show deprecation warning when `browserBuildDirectory…
Browse files Browse the repository at this point in the history
…` config is used (#5702)
  • Loading branch information
MichaelDeBoey authored Mar 14, 2023
1 parent 950993d commit 1bd803a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/proud-nails-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": minor
---

show deprecation warning when `browserBuildDirectory` config is used
7 changes: 6 additions & 1 deletion packages/remix-dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,10 @@ export async function readConfig(
? path.resolve(appDirectory, userEntryServerFile)
: path.resolve(defaultsDirectory, entryServerFile);

if (appConfig.browserBuildDirectory) {
warnOnce(browserBuildDirectoryWarning, "browserBuildDirectory");
}

let assetsBuildDirectory =
appConfig.assetsBuildDirectory ||
appConfig.browserBuildDirectory ||
Expand Down Expand Up @@ -739,7 +743,8 @@ 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 browserBuildDirectoryWarning = `⚠️ DEPRECATED: The \`browserBuildDirectory\` config option is deprecated. Use \`assetsBuildDirectory\` 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.`;

Expand Down

0 comments on commit 1bd803a

Please sign in to comment.