Skip to content

The onResolve callback is dead weight — remove it entirely #26

@glromeo

Description

@glromeo

esbuild's default resolver already handles node_modules, tsconfig paths, etc. The onResolve here is just delegating straight back to build.resolve with the same args and no transformation — it exists solely to switch the namespace to "postcss". But that's unnecessary: you can arguably filter on namespace "file" directly in onLoad, since that's what esbuild assigns to resolved filesystem paths.

build.onLoad({ filter: /\.css$/, namespace: "file" }, async (args) => {
  // ...
});

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