Steve Mao
Steve Mao
I haven't used those two modules but if you come up with something go for it 😄
@hbetts Why is this closed?
Why don't you use static import for this? ```js import enLocale from 'date-fns/locale/en' import deLocale from 'date-fns/locale/de' ... ```
dynamic import would be the same as `require` and you have to manually exclude the script.
BTW, your example doesn't involve tree shaking. Just inclusion/exclusion of scripts.
https://github.com/you-dont-need/You-Dont-Need-Momentjs/issues/12 is already talking about this. See https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
> Once again - the reason I suggested to include this case is because for long time I was hesitating to move from moment.js to date-fns since I wasn't sure...
Yeah man, go for it 👍 :)
@rodrigogs PR welcome
PR welcome