How to use masonry-layout on Sage 9 + Webpack?

I’m having trouble importing Masonry in my new Sage 9 project. I’ve installed it using yarn add masonry-layout, but how should I import it without error?

What have you tried?