Skip to content

[Feature Request]: extend onResolve plugin hook to include import attributes in import-statement #3639

Description

@barak007

esbuild is not strong in splitting chunks. some related issues (#16, #207, #1781, #2208, #2227, #2419)

if the onResolve hook would have the entire import information a plugin could implement much better splitting strategy based on native imports.

The idea is, if a plugin can collect all the imported named symbols from a specific import-statement request, it could externalize the request and generate a esm bundle (with correct exports) from a cjs/umd module like react.

my goal is to optimize large code base watch mode by externalizing modules to separate builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions