I have this require statement
require(\'smoothscroll-polyfill\').polyfill();
But I would like to write it as an es6 impor
Assuming you're using Babel or something similar to provide compatibility between CommonJS modules and ES6 modules, the syntax would look something like this:
import smoothscrollPolyfill from "smoothscroll-polyfill"; smoothscrollPolyfill.polyfill();