Add initial configuration changes for webpack 5 (#11917)
Add initial configuration changes for webpack 5 (#11917)

* Disable PnP plugin in webpack 5

Co-Authored-By: Zack Jackson <80e2887260e3472f1bd1b387a02f45547938224d@gmail.com>

* Use full hashes for hot update names

Co-Authored-By: Zack Jackson <80e2887260e3472f1bd1b387a02f45547938224d@gmail.com>

* Disable autodll in webpack 5

Co-Authored-By: Zack Jackson <80e2887260e3472f1bd1b387a02f45547938224d@gmail.com>

* Disable HashedModuleIdsPlugin in webpack 5

Co-Authored-By: Zack Jackson <80e2887260e3472f1bd1b387a02f45547938224d@gmail.com>

* Use regexes for ignoreplugin as it only supports regexes in webpack 5

Co-Authored-By: Zack Jackson <80e2887260e3472f1bd1b387a02f45547938224d@gmail.com>

* webpack 4 supports resourceRegExp and contextRegExp

Co-Authored-By: Zack Jackson <80e2887260e3472f1bd1b387a02f45547938224d@gmail.com>

* Remove webpack 4 specific properties from the webpack 5 config

Co-Authored-By: Zack Jackson <80e2887260e3472f1bd1b387a02f45547938224d@gmail.com>

* Add library option for webpack 5 support

Co-Authored-By: Zack Jackson <80e2887260e3472f1bd1b387a02f45547938224d@gmail.com>

* Fix TypeScript Errors

Co-authored-by: Zack Jackson <80e2887260e3472f1bd1b387a02f45547938224d@gmail.com>
Co-authored-by: Joe Haddad <9a59834641c3efaef8f42337ff0c7967b38f1c43@zeit.co>
flybayer/next.js,azukaru/next.js,zeit/next.js,azukaru/next.js,JeromeFitz/next.js,zeit/next.js,azukaru/next.js,JeromeFitz/next.js,flybayer/next.js,flybayer/next.js,JeromeFitz/next.js,JeromeFitz/next.js,azukaru/next.js,flybayer/next.js,zeit/next.js