Hi,
I cannot find a way to import several libraries such as Redux or RxJS through standard imports
e.g. import { configureStore } from '@reduxjs/toolkit';
This will result in a runtime error (configureStore is undefined). I think this is because it is resolved as a CJS module containing a default
entry.
Using import toolkit from '@reduxjs/toolkit';
and then const { configureStore } = toolkit;
works though. But as you can imagine, it is pretty cumbersome and doesn’t works well with IDE autoimports.
Redux is used as a reproducible example here but this happens with several third party libraries.
I tried several typescript configurations (module and moduleResolution for example) with no avail. Is there a way to configure TS or CC so it works as it should or maybe can you consider looking into this as a bug and plan a fix?