From 4cd847f6bad1e799179b3e50f7cd571a4565cf84 Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 14 Sep 2022 18:44:43 -0700 Subject: [PATCH] Simplify references to PUBLIC_URL The Next.js from react-create-app codemod automatically added this, just in case it mattered for us. It doesn't! I'd rather just avoid the code complexity. --- next.config.js | 3 --- pages/_document.tsx | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/next.config.js b/next.config.js index 46af0c4..5af2736 100644 --- a/next.config.js +++ b/next.config.js @@ -1,8 +1,5 @@ module.exports = { reactStrictMode: true, - env: { - PUBLIC_URL: "", - }, async rewrites() { return [ { diff --git a/pages/_document.tsx b/pages/_document.tsx index ec90d77..4848421 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -11,19 +11,19 @@ class MyDocument extends Document { rel="icon" type="image/png" sizes="32x32" - href={`${process.env.PUBLIC_URL}/favicon-32x32.png`} + href="/favicon-32x32.png" />