I've been struggling for a while with minify javascript on magento 2. The admin option for minification doesn't work so I've been looking for another solution. I've tried a gulp script to do it but this is causing issues with require js where certain files are not ready in time to be included.
Has anyone found a solution for minifying javascript on magento 2?