Repository: vercel/next.js
File: test/production/next-server-nft/next-server-nft.test.ts (TypeScript)

Code before:
                file.endsWith('.node')
              ) {
                return file
              } else {
                let match = /^\/node_modules\/(@[^/]+\/[^/]+|[^/]+)\//.exec(
                  file
                )
                if (match != null) {
                  return `/node_modules/${match[1]}/*`
                }
              }
              return file
            })
          ),
        ]

        expect(traceGrouped).toMatchInlineSnapshot(`
         [
           "/node_modules/@img/colour/*",
           "/node_modules/@img/sharp-*/sharp-*.node",
           "/node_modules/@img/*",
           "/node_modules/@next/env/*",
           "/node_modules/@swc/helpers/*",
           "/node_modules/client-only/*",
           "/node_modules/detect-libc/*",
           "/node_modules/next/dist/build/define-env.js",
           "/node_modules/next/dist/build/duration-to-string.js",
           "/node_modules/next/dist/build/next-config-ts/require-hook.js",
           "/node_modules/next/dist/build/next-config-ts/transpile-config.js",
           "/node_modules/next/dist/build/output/format.js",
           "/node_modules/next/dist/build/output/log.js",
           "/node_modules/next/dist/build/segment-config/app/app-segment-config.js",
           "/node_modules/next/dist/build/segment-config/app/app-segments.js",
           "/node_modules/next/dist/build/segment-config/app/collect-root-param-keys.js",
           "/node_modules/next/dist/build/static-paths/app.js",
           "/node_modules/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js",
           "/node_modules/next/dist/build/static-paths/pages.js",
           "/node_modules/next/dist/build/static-paths/utils.js",
           "/node_modules/next/dist/build/swc/index.js",
           "/node_modules/next/dist/build/swc/options.js",
           "/node_modules/next/dist/build/utils.js",
           "/node_modules/next/dist/cli/next-test.js",
           "/node_modules/next/dist/client/*",
           "/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js",
           "/node_modules/next/dist/compiled/@edge-runtime/ponyfill/index.js",
           "/node_modules/next/dist/compiled/@edge-runtime/primitives/abort-controller.js.text.js",
           "/node_modules/next/dist/compiled/@edge-runtime/primitives/console.js.text.js",
           "/node_modules/next/dist/compiled/@edge-runtime/primitives/events.js.text.js",
           "/node_modules/next/dist/compiled/@edge-runtime/primitives/index.js",
           "/node_modules/next/dist/compiled/@edge-runtime/primitives/load.js",
           "/node_modules/next/dist/compiled/@edge-runtime/primitives/stream.js",

Review comment (suggestion):
Should this file also be used as an external in minimal mode?
Because I'd have expected it to show up in the other snapshot down below as well then

Code after:
                file.endsWith('.node')
              ) {
                return file
              } else {
                let match = /^\/node_modules\/(@[^/]+\/[^/]+|[^/]+)\//.exec(
                  file
                )
                if (match != null) {
                  return `/node_modules/${match[1]}/*`
                }
              }
              return file
            })
          ),
        ]

        expect(traceGrouped).toMatchInlineSnapshot(`
         [
           "/node_modules/@img/colour/*",
           "/node_modules/@img/sharp-*/sharp-*.node",
           "/node_modules/@img/*",
           "/node_modules/@next/env/*",
           "/node_modules/@swc/helpers/*",
           "/node_modules/client-only/*",
           "/node_modules/detect-libc/*",
           "/node_modules/next/dist/build/adapter/setup-node-env.external.js",
           "/node_modules/next/dist/build/define-env.js",
           "/node_modules/next/dist/build/duration-to-string.js",
           "/node_modules/next/dist/build/next-config-ts/require-hook.js",
           "/node_modules/next/dist/build/next-config-ts/transpile-config.js",
           "/node_modules/next/dist/build/output/format.js",
           "/node_modules/next/dist/build/output/log.js",
           "/node_modules/next/dist/build/segment-config/app/app-segment-config.js",
           "/node_modules/next/dist/build/segment-config/app/app-segments.js",
           "/node_modules/next/dist/build/segment-config/app/collect-root-param-keys.js",
           "/node_modules/next/dist/build/static-paths/app.js",
           "/node_modules/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js",
           "/node_modules/next/dist/build/static-paths/pages.js",
           "/node_modules/next/dist/build/static-paths/utils.js",
           "/node_modules/next/dist/build/swc/index.js",
           "/node_modules/next/dist/build/swc/options.js",
           "/node_modules/next/dist/build/utils.js",
           "/node_modules/next/dist/cli/next-test.js",
           "/node_modules/next/dist/client/*",
           "/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js",
           "/node_modules/next/dist/compiled/@edge-runtime/ponyfill/index.js",
           "/node_modules/next/dist/compiled/@edge-runtime/primitives/abort-controller.js.text.js",
           "/node_modules/next/dist/compiled/@edge-runtime/primitives/console.js.text.js",
           "/node_modules/next/dist/compiled/@edge-runtime/primitives/events.js.text.js",
           "/node_modules/next/dist/compiled/@edge-runtime/primitives/index.js",
           "/node_modules/next/dist/compiled/@edge-runtime/primitives/load.js",