webpack is MIT licensed.
The webpack logo and icon are under a different license which can be found here.
The content on https://webpack.js.org/ is available under Creative Commons BY 4.0 license meaning attribution is required should you use the content elsewhere.
The code samples use CC0 1.0 Universal (CC0 1.0) (Public Domain) and you are free to use them as you like.