Migrate to webpack 5, use caching on builds.
Summary
Building assets in pipelines is taking a long time.
Webpack 5 should support caching to the filesystem out of the box.
The cache can be published as an artifact, and reused across builds.
records will allow consistent hash names on chunks/modules so the client would only need to re-download assets that change. (better performance in production likely)
the clean option is supported in webpack 5, and will allow builds to clean up old/unused files.
gotchas
`
- new vue-loader versions are for vue3 -
"vue-loader": "^15.0.0"is for webpack 5 with vue2 - Dynamic imports don't work when exports specified in package.json
Edited by Sean Gregory