Background
Previously, I was using unplugin-auto-import in Next.js through a webpack plugin. However, since Next.js v16, webpack plugins are no longer supported, and turbopack doesn't support the plugin mechanism yet, but it does support webpack loaders.
Implementation
Thanks to the well-encapsulated underlying capabilities of unimport, implementing a webpack loader wasn't too difficult. This allows for a smoother upgrade to Next.js v16.
Source code: auto-import-x-loader