Skip to content

Commit

Permalink
feat(remix-dev)!: remove browserBuildDirectory config option
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Jul 20, 2023
1 parent 7098a84 commit 043091a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 27 deletions.
5 changes: 5 additions & 0 deletions .changeset/silver-readers-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": major
---

Remove `browserBuildDirectory` config option
28 changes: 1 addition & 27 deletions packages/remix-dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,6 @@ export interface AppConfig {
*/
assetsBuildDirectory?: string;

/**
* The path to the browser build, relative to remix.config.js. Defaults to
* "public/build".
*
* @deprecated Use `{@link AppConfig.assetsBuildDirectory}` instead
*/
browserBuildDirectory?: string;

/**
* The URL prefix of the browser build with a trailing slash. Defaults to
* `"/build/"`. This is the path the browser will use to find assets.
Expand Down Expand Up @@ -785,14 +777,8 @@ export async function readConfig(
? path.resolve(appDirectory, userEntryServerFile)
: path.resolve(defaultsDirectory, entryServerFile);

if (appConfig.browserBuildDirectory) {
browserBuildDirectoryWarning();
}

let assetsBuildDirectory =
appConfig.assetsBuildDirectory ||
appConfig.browserBuildDirectory ||
path.join("public", "build");
appConfig.assetsBuildDirectory || path.join("public", "build");

let absoluteAssetsBuildDirectory = path.resolve(
rootDirectory,
Expand Down Expand Up @@ -1018,18 +1004,6 @@ let disjunctionListFormat = new Intl.ListFormat("en", {
type: "disjunction",
});

let browserBuildDirectoryWarning = () =>
logger.warn(
"The `browserBuildDirectory` config option will be removed in v2",
{
details: [
"You can use the `assetsBuildDirectory` config option instead.",
"-> https://remix.run/docs/en/v1.15.0/pages/v2#browserbuilddirectory",
],
key: "browserBuildDirectoryWarning",
}
);

let serverBuildDirectoryWarning = () =>
logger.warn(
"The `serverBuildDirectory` config option will be removed in v2",
Expand Down

0 comments on commit 043091a

Please sign in to comment.