Skip to content

Solving Next.js v16 auto-import: Introducing webpack loader-based auto-import-x-loader #615

@yunsii

Description

@yunsii

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions