From 9029588590bea8b10451575c5142dcde77ecd1b5 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 3 Nov 2023 21:25:40 +0800 Subject: chore: delete useless files --- packages/turbo-tracing-next-plugin/src/index.ts | 27 ------------------------- 1 file changed, 27 deletions(-) delete mode 100644 packages/turbo-tracing-next-plugin/src/index.ts (limited to 'packages/turbo-tracing-next-plugin/src') diff --git a/packages/turbo-tracing-next-plugin/src/index.ts b/packages/turbo-tracing-next-plugin/src/index.ts deleted file mode 100644 index 0b75113..0000000 --- a/packages/turbo-tracing-next-plugin/src/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { - NodeModuleTracePlugin, - NodeModuleTracePluginOptions, -} from "@vercel/webpack-nft"; -import type { NextConfig } from "next"; - -export function createNodeFileTrace(options?: NodeModuleTracePluginOptions) { - return function withNodeFileTrace(config: NextConfig = {}) { - const createWebpackConfig = config.webpack; - config.outputFileTracing = false; - config.webpack = (webpackConfig, context) => { - const config = - createWebpackConfig?.(webpackConfig, context) ?? webpackConfig; - if (context.isServer && !context.dev) { - const plugin = new NodeModuleTracePlugin(options); - if (config.plugins) { - config.plugins.push(plugin); - } else { - config.plugins = [plugin]; - } - } - - return config; - }; - return config; - }; -} -- cgit v1.2.3-70-g09d2