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) => {
// ...
});