From aa7094fcc7c2992fa374aa07c4460b6deef8660f Mon Sep 17 00:00:00 2001 From: Will Binns-Smith Date: Mon, 6 Feb 2023 08:42:44 -0800 Subject: [PATCH] Rename experimental.resolveAlias to experimental.turbopackResolveAlias --- crates/next-core/src/next_config.rs | 4 ++-- .../tests/integration/next/resolve-alias/basic/input/index.js | 4 ++-- .../integration/next/resolve-alias/basic/input/next.config.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/next-core/src/next_config.rs b/crates/next-core/src/next_config.rs index dc74ca0f429f3..cdbebb9c1c260 100644 --- a/crates/next-core/src/next_config.rs +++ b/crates/next-core/src/next_config.rs @@ -244,9 +244,9 @@ pub enum RemotePatternProtocal { #[serde(rename_all = "camelCase")] pub struct ExperimentalConfig { pub app_dir: Option, - pub resolve_alias: Option>, pub server_components_external_packages: Option>, pub turbopack_loaders: Option>, + pub turbopack_resolve_alias: Option>, // unsupported adjust_font_fallbacks: Option, @@ -414,7 +414,7 @@ impl NextConfigVc { #[turbo_tasks::function] pub async fn resolve_alias_options(self) -> Result { let this = self.await?; - let Some(resolve_alias) = this.experimental.resolve_alias.as_ref() else { + let Some(resolve_alias) = this.experimental.turbopack_resolve_alias.as_ref() else { return Ok(ResolveAliasMapVc::cell(ResolveAliasMap::default())); }; let alias_map: ResolveAliasMap = resolve_alias.try_into()?; diff --git a/crates/next-dev-tests/tests/integration/next/resolve-alias/basic/input/index.js b/crates/next-dev-tests/tests/integration/next/resolve-alias/basic/input/index.js index 978c833e89698..9946f147db883 100644 --- a/crates/next-dev-tests/tests/integration/next/resolve-alias/basic/input/index.js +++ b/crates/next-dev-tests/tests/integration/next/resolve-alias/basic/input/index.js @@ -1,10 +1,10 @@ import foo from "foo"; import foo2 from "foo2"; -it("aliases foo to bar through the next.config.js experimental.resolveAlias property", () => { +it("aliases foo to bar through the next.config.js experimental.turbopackResolveAlias property", () => { expect(foo).toBe(42); }); -it("aliases foo2 to bar through the next.config.js experimental.resolveAlias property with export condition", () => { +it("aliases foo2 to bar through the next.config.js experimental.turbopackResolveAlias property with export condition", () => { expect(foo2).toBe(42); }); diff --git a/crates/next-dev-tests/tests/integration/next/resolve-alias/basic/input/next.config.js b/crates/next-dev-tests/tests/integration/next/resolve-alias/basic/input/next.config.js index 47960888cf7b1..9e18a6df0ab40 100644 --- a/crates/next-dev-tests/tests/integration/next/resolve-alias/basic/input/next.config.js +++ b/crates/next-dev-tests/tests/integration/next/resolve-alias/basic/input/next.config.js @@ -1,6 +1,6 @@ module.exports = { experimental: { - resolveAlias: { + turbopackResolveAlias: { foo: ["bar"], foo2: { browser: "bar" }, },