create-react-app-esbuild icon indicating copy to clipboard operation
create-react-app-esbuild copied to clipboard

How to resolve aliases via Typescript paths?

Open davnicwil opened this issue 4 years ago • 0 comments

Thanks for this great plugin!

Is there a way to have it resolve aliases via the Typescript paths setting in tsconfig.json?

Out of the box, code that compiles fine with rescripts start does not compile with the setup described in the readme here (i.e. just CracoEsbuildPlugin configured in craco.config.js, nothing else) and craco start -- compilation fails on module resolution for any alias.

I noticed that esbuild itself theoretically has support for this (see here) though apparently not without the --bundle flag set. Is that the limitation here? Or is this something that needs to be configured in some particular way for craco?

davnicwil avatar Jun 07 '21 13:06 davnicwil