Closed aamirafridi closed 3 years ago
I know that this works
import {
DesktopDateRangePicker,
MobileDateRangePicker,
} from "@material-ui/pickers";
@aamirafridi We don't support nested imports for the pickers repository. We might with https://github.com/mui-org/material-ui/issues/19706. I think that the correct solution would be:
import DateRangePicker, {
DesktopDateRangePicker,
MobileDateRangePicker,
} from "@material-ui/pickers/DateRangePicker";
The incentive so far for supporting it is that tree-shaking doesn't work in development, which can harm the DX.
Ok thanks :)
Keeping it open to signal that it's not fixed and incentive for more comments.
Using the Import like this for treeshaking
No TS error but JS errored
Cannot find module '@material-ui/pickers/DateRangePicker/DateRangePicker'