Here is the complete error:
Liquid Exception: Unexpected token: keyword (const). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true). in /_layouts/base.html
I found online that the solution should be to use:
Uglifier.compile(js, harmony: true)
in a production.rb file, which I don't have since I'm using Jekyll and all I can set is in config.yml:
...
assets:
js_compressor: uglifier
...
Get rid of Uglifier. It doesn't support ES6, or at least it doesn't with the configuration that ships with Rails.