In order to support using TypeScript, Angular and a better less compiler in the future we should consider allowing webpack in the development workflow.
A possible way to do this would be to run webpack on build via some sort of build-js command. this would be run by matomo-package when generating the default matomo package, and for plugins on the marketplace when deploying new versions. (Doing it this way means we don't have to require node on users' machines.)
Using it for less compilation is generally more of an issue since it would break theming.