First install uglifyjs-webpack-plugin with yarn Then add these line in webpack configeriation file It's done! Reference https://github.com/rails/webpacker/blob/master/docs/webpack.md https://webpac...