How to import a deep…

less than 1 minute read

How to import() a deep export from a lib?

Responses:

"paths": { "@scope/auth/*": ["libs/auth/src/pages/*"], } That works for TS but no for webpack :confused: My use case is lazy loading react components.

I could to import('@scope/auth').then((res) => ({ default: res.ResetPassword })) but then the entire module will get loaded and I just need one component.

After restarting webpack it works :slightly_smiling_face:

Updated: