Did you get this to work properly with webpack 4 and production build mode? When i tried this recently webpack failed to notice that these imports were in use and removed them from the production build.
That is a really weird case scenario. I didn't have any issues with the latest version of Next.js, which should be using latest Webpack as well. Are you using babel-preset-env and Node v8 or newer?
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.