JavaScript Transpiler | Hugo (0.70.0 release notes)

https://gohugo.io/news/0.70.0-relnotes/

Featured Image for JavaScript Transpiler

This is a small release, and the main new feature is that you can now use Babel to transpile JavaScript.

This release represents 22 contributions by 12 contributors to the main Hugo code base.@bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @BurtonQin, @tekezo, and @sensimevanidus for their ongoing contributions. And a big thanks to @digitalcraftsman and @onedrawingperday for their relentless work on keeping the themes site in pristine condition and to @davidsneighbour and @kaushalmodi for all the great work on the documentation site.

Many have also been busy writing and fixing the documentation in hugoDocs, which has received 6 contributions by 4 contributors . A special thanks to @bep, @MJ2097, @jeremyzilar, and @larryclaman for their work on the documentation site.

Hugo now has:

Enhancements

Templates

Output

Core

Other

Fixes

Other

Hugo Pipe’s Babel requires the @babel/cli and @babel/core JavaScript packages to be installed in the project or globally ( npm install -g @babel/cli @babel/core ) along with any Babel plugin(s) or preset(s) used (e.g., npm install @babel/preset-env --save-dev ).

If you are using the Hugo Snap package, Babel and plugin(s) need to be installed locally within your Hugo site directory, e.g., npm install @babel/cli @babel/core --save-dev without the -g flag.

Of interest to folks using JavaScript, maybe? I personally don’t use babel (or even npm), so not much for me here. :slight_smile: