From 4bca939ff72c83fbedae2cba91317e91b804c8d3 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Mon, 7 Dec 2020 23:35:28 +0100 Subject: [PATCH] Remove aliases that are no longer needed (#19937) Fixes #19939 --- packages/next/build/webpack-config.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 8accd67c3a..df932988f8 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -364,15 +364,6 @@ export default async function getBaseWebpackConfig( ...nodePathList, // Support for NODE_PATH environment variable ], alias: { - // These aliases make sure the wrapper module is not included in the bundles - // Which makes bundles slightly smaller, but also skips parsing a module that we know will result in this alias - 'next/head': 'next/dist/next-server/lib/head.js', - 'next/router': 'next/dist/client/router.js', - 'next/experimental-script': config.experimental.scriptLoader - ? 'next/dist/client/experimental-script.js' - : '', - 'next/config': 'next/dist/next-server/lib/runtime-config.js', - 'next/dynamic': 'next/dist/next-server/lib/dynamic.js', next: NEXT_PROJECT_ROOT, ...(isWebpack5 && !isServer ? { -- GitLab