Created by: raix
Webpack 5 update Includes the work listed in #9994 (closed) Replace #10656 and targeting the wp5 branch
Additional changes:
- persistent cache
- upgrade to dev server ´v4 (still beta)
- terser is now included in webpack
- comment out test except simple/kitchensink/oldnode
- update test matrix to use node 12 + 14 (postcss-normalize requires v12 + webpack 5)
Known issues:
- It feels like webpack emits compile twice - triggers a re print out on the screen (might be due to hook behavior change - or some of the code I removed in that area - maybe rewrite?)
Things I wanted to do but left out:
- extract loaders/plugins etc. into separate files to make the main webpack config clean / easier to read
- allowed domains - we should allow configuration and wildcard support imho
- print out performance stats of the build - really hard to track / compare build speeds - eg. detecting regression
- fix the test suite or comment out failing tests - eg. the pnp test is currently failing on master not sure if this pr. makes things better or worse
- Maybe remove the CRA error overlay as the default webpack overlay is very similar and require less config + code?
Credit include @andriijas, @sebinsua and @jasonwilliams (let me know if I missed out on any)