diff --git a/packages/next/src/build/webpack-config.ts b/packages/next/src/build/webpack-config.ts index 26334bf6bf978..884be1b1f6c6e 100644 --- a/packages/next/src/build/webpack-config.ts +++ b/packages/next/src/build/webpack-config.ts @@ -1776,7 +1776,6 @@ export default async function getBaseWebpackConfig( optOutBundlingPackages, traceIgnores: [], compilerType, - swcLoaderConfig: swcDefaultLoader, } ), // Moment.js is an extremely popular library that bundles large locale files diff --git a/packages/next/src/build/webpack/plugins/next-trace-entrypoints-plugin.ts b/packages/next/src/build/webpack/plugins/next-trace-entrypoints-plugin.ts index b47279b60127e..8d2056380ce62 100644 --- a/packages/next/src/build/webpack/plugins/next-trace-entrypoints-plugin.ts +++ b/packages/next/src/build/webpack/plugins/next-trace-entrypoints-plugin.ts @@ -1,10 +1,8 @@ import nodePath from 'path' -import crypto from 'crypto' import type { Span } from '../../../trace' import { spans } from './profiling-plugin' import isError from '../../../lib/is-error' import { nodeFileTrace } from 'next/dist/compiled/@vercel/nft' -import type { SWCLoaderOptions } from '../loaders/next-swc-loader' import type { NodeFileTraceReasons } from 'next/dist/compiled/@vercel/nft' import { CLIENT_REFERENCE_MANIFEST, @@ -126,10 +124,6 @@ export interface BuildTraceContext { } } -export function getHash(content: string | Buffer): string { - return crypto.createHash('sha1').update(content).digest('hex') -} - export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance { public buildTraceContext: BuildTraceContext = {} @@ -142,12 +136,7 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance { private entryTraces: Map> private traceIgnores: string[] private esmExternals?: NextConfigComplete['experimental']['esmExternals'] - private traceHashes: Map private compilerType: CompilerNameValues - private swcLoaderConfig: { - loader: string - options: SWCLoaderOptions - } constructor({ rootDir, @@ -159,7 +148,6 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance { traceIgnores, esmExternals, outputFileTracingRoot, - swcLoaderConfig, }: { rootDir: string compilerType: CompilerNameValues @@ -170,7 +158,6 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance { traceIgnores?: string[] outputFileTracingRoot?: string esmExternals?: NextConfigComplete['experimental']['esmExternals'] - swcLoaderConfig: TraceEntryPointsPlugin['swcLoaderConfig'] }) { this.rootDir = rootDir this.appDir = appDir @@ -181,9 +168,7 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance { this.traceIgnores = traceIgnores || [] this.tracingRoot = outputFileTracingRoot || rootDir this.optOutBundlingPackages = optOutBundlingPackages - this.traceHashes = new Map() this.compilerType = compilerType - this.swcLoaderConfig = swcLoaderConfig } // Here we output all traced assets and webpack chunks to a diff --git a/test/e2e/app-dir/app/middleware.js b/test/e2e/app-dir/app/middleware.js index 1a233b88bfe14..56bc894fc458a 100644 --- a/test/e2e/app-dir/app/middleware.js +++ b/test/e2e/app-dir/app/middleware.js @@ -6,14 +6,6 @@ import { NextResponse } from 'next/server' * @returns {Promise} */ export async function middleware(request) { - if (request.nextUrl.pathname === '/flying-shuttle') { - return NextResponse.next({ - headers: { - 'x-flying-shuttle': '1', - }, - }) - } - if (request.nextUrl.pathname === '/searchparams-normalization-bug') { const headers = new Headers(request.headers) headers.set('test', request.nextUrl.searchParams.get('val') || '') diff --git a/test/turbopack-build-tests-manifest.json b/test/turbopack-build-tests-manifest.json index ebba09d2f7f62..18d09096449e5 100644 --- a/test/turbopack-build-tests-manifest.json +++ b/test/turbopack-build-tests-manifest.json @@ -1134,19 +1134,6 @@ "flakey": [], "runtimeError": false }, - "test/e2e/app-dir/app/flying-shuttle.test.ts": { - "passed": [], - "failed": [], - "pending": [ - "should output updated trace files should hard navigate on chunk load failure", - "should output updated trace files should have file hashes in trace files", - "should output updated trace files should only rebuild a changed app and pages route correctly", - "should output updated trace files should only rebuild just a changed app route correctly", - "should output updated trace files should only rebuild just a changed pages route correctly" - ], - "flakey": [], - "runtimeError": false - }, "test/e2e/app-dir/app/index.test.ts": { "passed": [ "app dir - basic should allow linking from app page to pages page", @@ -5139,15 +5126,6 @@ "flakey": [], "runtimeError": false }, - "test/e2e/instrumentation-hook/flying-shuttle/flying-shuttle.test.ts": { - "passed": [ - "instrumentation-hook - flying-shuttle should only register without errors" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/e2e/instrumentation-hook/instrumentation-hook.test.ts": { "passed": [ "Instrumentation Hook general should not overlap with a instrumentation page",