From 3803ae144e2ea41b073daef640dc2cda7a6215c0 Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Tue, 4 Jul 2023 17:38:12 +0200 Subject: [PATCH] delete pitch loader --- .../webpack/loaders/next-flight-css-loader.ts | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/packages/next/src/build/webpack/loaders/next-flight-css-loader.ts b/packages/next/src/build/webpack/loaders/next-flight-css-loader.ts index 2883466c0cdd7..eb177c4887f89 100644 --- a/packages/next/src/build/webpack/loaders/next-flight-css-loader.ts +++ b/packages/next/src/build/webpack/loaders/next-flight-css-loader.ts @@ -7,19 +7,6 @@ import crypto from 'crypto' import type webpack from 'webpack' -export const pitch: webpack.PitchLoaderDefinitionFunction = - function () { - if (process.env.NODE_ENV !== 'production') { - // @ts-expect-error TODO: Should we use readFile instead? - const content = this.fs.readFileSync(this.resourcePath) - this.data.__checksum = crypto - .createHash('sha256') - .update(typeof content === 'string' ? Buffer.from(content) : content) - .digest() - .toString('hex') - } - } - type NextServerCSSLoaderOptions = { cssModules: boolean } @@ -45,10 +32,7 @@ const NextServerCSSLoader: webpack.LoaderDefinitionFunction