How to combine javascript files without plugins?

I remember (it seems...) there was a way, maybe some config option, to combine/merge javascript files (for production sites). I mean just with vanilla wordpress code, not plugins.

Am I wrong? If not, how to? Can't find reliable infos.

Topic wp-config configuration Wordpress javascript performance

Category Web


I prefer separete all my front-end assets from the back-end, so I use Gulp to manage (compile, mifify etc..) all my assets.

But if you want to use Wordpress I found this article. I did not test the code, but by just reading and seeing the comment section I think that will work for you.

But I really recommend you to use something Like Gulp, Webpack or Yarn to manage your front-end assets.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.