Repository: tailwindlabs/tailwindcss
File: packages/@tailwindcss-postcss/src/index.ts (TypeScript)

Code before:
              if (changedTime === null) {
                if (file === inputFile) {
                  rebuildStrategy = 'full'
                }
                continue
              }

              let prevTime = context.mtimes.get(file)
              if (prevTime === changedTime) continue

              rebuildStrategy = 'full'
              context.mtimes.set(file, changedTime)
            }
          }

          // Do nothing if neither `@tailwind` nor `@apply` is used
          if (!hasTailwind && !hasApply) return

          let css = ''

          // Look for candidates used to generate the CSS
          let scanner = new Scanner({
            detectSources: { base },
            sources: context.compiler.globs.map(({ origin, pattern }) => ({
              // Ensure the glob is relative to the input CSS file or the config
              // file where they are specified.
              base: origin ? path.dirname(path.resolve(inputBasePath, origin)) : inputBasePath,
              pattern,
            })),
          })

          //
          let candidates = scanner.scan()

          // Add all found files as direct dependencies
          for (let file of scanner.files) {
            result.messages.push({
              type: 'dependency',
              plugin: '@tailwindcss/postcss',
              file,
              parent: result.opts.from,
            })
          }

          // Register dependencies so changes in `base` cause a rebuild while
          // giving tools like Vite or Parcel a glob that can be used to limit
          // the files that cause a rebuild to only those that match it.
          for (let { base, pattern } of scanner.globs) {
            result.messages.push({
              type: 'dir-dependency',
              plugin: '@tailwindcss/postcss',

Review comment (suggestion):
```suggestion
              // file where it is specified.
```

Code after:
              if (changedTime === null) {
                if (file === inputFile) {
                  rebuildStrategy = 'full'
                }
                continue
              }

              let prevTime = context.mtimes.get(file)
              if (prevTime === changedTime) continue

              rebuildStrategy = 'full'
              context.mtimes.set(file, changedTime)
            }
          }

          // Do nothing if neither `@tailwind` nor `@apply` is used
          if (!hasTailwind && !hasApply) return

          let css = ''

          // Look for candidates used to generate the CSS
          let scanner = new Scanner({
            detectSources: { base },
            sources: context.compiler.globs.map(({ origin, pattern }) => ({
              // Ensure the glob is relative to the input CSS file or the config
              // file where it is specified.
              base: origin ? path.dirname(path.resolve(inputBasePath, origin)) : inputBasePath,
              pattern,
            })),
          })

          //
          let candidates = scanner.scan()

          // Add all found files as direct dependencies
          for (let file of scanner.files) {
            result.messages.push({
              type: 'dependency',
              plugin: '@tailwindcss/postcss',
              file,
              parent: result.opts.from,
            })
          }

          // Register dependencies so changes in `base` cause a rebuild while
          // giving tools like Vite or Parcel a glob that can be used to limit
          // the files that cause a rebuild to only those that match it.
          for (let { base, pattern } of scanner.globs) {
            result.messages.push({
              type: 'dir-dependency',
              plugin: '@tailwindcss/postcss',